J2EE installtion Question

Hi,
I install J2EE1.2.1 reference implementation(j2sdkee1.2.1). My Question is -
(1) Do I need to install EJB ver1.1, JSP ver1.1 and serverlet ver 2.2. because under bin folder of j2sdkee, in the j2ee.bat file,
"rem set J2EE_HOME to the path where you have installed this package (EJB server)." I currently set environment variables - JAVA_HOME to c:\jdk1.3.1 and J2EE_HOME to c:\j2sdkee. Can I do like this?
(2) In my program, I will use JSP and servelet, so do I need to install Apache tomecat for this purpose after installing above J2EE platform??
Thank you very much.

Hi Emily,
The solutions to your queries :
Q. I don't know how to to set the CLASSPATHS for the EJB, JSP ver1.1 and serverlet ver 2.2 JARs ?
Can you Pls tell me how to do ?
A. Ya. I assume that u have installed the software on C:
Find where the ejb.jar file is installed on ur system. Then Type the following at the command prompt :
SET CLASSPATH=C:\path\to\your\ejb.jar
For Servlets:
Find where the ejb.jar file is installed on ur system. Then Type the following at the command prompt :
SET CLASSPATH=C:\path\to\your\servlets.jar
The JSP does not require a CLASSPATH setting. The servlets CLASSPATH handles it for JSP also.
Q. In the program , it imports " import org.w3c.dom.* " because of using getXML method. when I
compile the program, it shows error. How can I solve with it ??
A. What is the error ? If u could specify it, I could help u more.
Cheers !!
Sherbir.

Similar Messages

  • Fundamental j2ee classpath question

    hi folks --
    I have a j2ee project with
    - a WAR (which has among other things a servlet in it)
    - a ejb project (which has a stateless session bean in it)
    I need to call the session bean from the servlet and my servlet code gets a reference to the bean via jndi as follows
    ...skipping jndi stuff ...
    LoadTimerTaskHome loadTimerTaskHome = (LoadTimerTaskHome)PortableRemoteObject.narrow( timerHomeObject, LoadTimerTaskHome.class);
    However, at compile time, LoadTimerTaskHome (the home interface of the bean) can't be resolved in the servlet class. Which makes sense cuz how would the servlet class know about the bean class?
    And that's the question: At compile time, how can i make classes in my WAR aware of classes in my EJB proj, which are deployed to the same EAR? There must be a very simple J2EE way of doing this...
    I'm not an EJB person, so i'm just confused about what is probably extremely basic....
    thx VERY much for any insights...

    A brute force approach is to also package the ejb interface classes (and any classes needed by those interfaces etc.) in the .war. However, a cleaner solution is to put the shared classes within a utility .jar and package it within the .ear such they are visible by both .war and ejb-jar modules.
    In Java EE 5, this is easily done by putting the shared .jar in "lib" directory at the top-level of the .ear. Java EE 5 guarantees that any .jars within that directory are visible to all component modules within the .ear.
    Prior to Java EE 5, this was only possible by using the MANIFEST-CLASSPATH attribute within each module to refer to the utility .jar. That's very cumbersome and error-prone so I recommend the automatic "lib" directory approach.
    --ken                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           

  • ABAP+J2EE Installtion problem

    Dear All,
      We have installed netweaver 04 with ABAP engine and
      it is running well.
      Now when I am going to install ABAP+J2EE I have encountered
      the problem against installtion CD .
      It is aking for LABEL SAP:J2EE-CD:640SR1 ..
      Would please tell me which DVD/CD I have to Use since I have downlaoded it from SAP service market place.
      DVD no is 51030724_3 and 51030724_3.
      Thanking you in Advance
      Siladitya

    hi,
    go to Installations and Upgrades in service market place.
    Installations and Upgrades --> SAP NetWeaver --> SAP NETWEAVER 04 --> Installation & Upgrades --> Windows Server --> MS SQL Server
    Look for the file 51030724_2 Content "SAP NW04 SR1 SAP J2EE Engine (OS independent parts)"  Size: 455926
    The info file will have the following content:
    <i>
    51030724_2 Content
    51030724_2:
    CDVersion.txt
    JDKVersion.xml
    KernelVersions.xml
    LABEL.ASC <b> This label will have the entries you need </b>
    LABELIDX.ASC
    PROD_LABEL
    J2EE-ENG:
    FS
    J2EENGINE
    JDMP
    LABEL.ASC
    FS:
    TC_SEC_JAVA_CRYPTO_FS_LIB.SDA
    J2EENGINE:
    J2EEINSTALL.SAR
    SLDSERV.JAR
    JDMP:
    EXPDUMP.001
    IMPORT.XML
    LABEL.ASC
    JDI:
    LABEL.ASC
    OFFLINE
    ONLINE
    OFFLINE:
    DEPLOY.LST
    SAPDEVINFF09_0.SCA
    ONLINE:
    DEPLOY.LST
    SAPBUILDT09_0.SCA
    SAPDEVINF09_0.SCA
    SDM:
    LABEL.ASC
    SDMKIT.JAR
    TEST-APP:
    630
    LABEL.ASC
    630:
    CalculatorLibrary.sda
    ShoppingCalculator.ear
    UtilityLibrary.sda
    calculator.ear
    </i>
    Hope this answered!
    Regards,
    ak

  • J2EE server0 question.....

    Hello everybody,
    In every J2EE instance there is a dispatcher and server0. This server0 could be up to server<n>, depending upon the load on the instance. When you add this server to J2EE then it basically adds more resources to instance.
    My question is how and where I can monitor the need to add another server<n> to a J2EE instance.
    Like I can monitor the SM50 to monitor the load in ABAP system.
    What is the optimized way to analyze and monitor the need to another another server<n> to a existing J2Ee instance.
    Your help will be greately appreciated.
    Thank you very much for the help.
    Thank you.
    Sume

    hi Sume
    > I really wanted a quick starting tip about how to
    > monitor that server is busy because of J2EE
    > application.
    You can monitor the J2ee Server using <b>Visual Administrator.</b>
    You should have <b>SLD</b> (System Landscape Directory) support to your Server to add Dialog instances (ie. create server<n>)
    This SLD can be made available to you during your installation of WebAS. It can be added later also to your system.
    You log in into the Visual Administrator. you will find all the instances of all the servers available in your SLD.
    The dispatcher will take care of load balancing ( i guess you gotta configure the dispatcher for this purpose)
    hope this was useful
    Regards,
    ak.
    Message was edited by: Arun Kumar Ravi

  • J2EE Home question

    Hello Community,
    my question is the following:
    where is located on the file system the J2EE home page, that is the file index.html which you can access pointing the web browser on the url:
    http://<server>:<port>/index.html
    Bestr Regards,
    Valerio

    Hi Valerio,
    Check out this thread
    /thread/152696 [original link is broken]
    Hope it hleps.
    Dao

  • J2EE Design Questions

    Please forgive me, I am just getting into J2EE and, despite having a mountain of manuals on my desk, I'm having a little trouble figuring out how everything fits together...
    Question 1.
    Is there any standard application entry point for an EJB container... kind of like main() in a plain old java application, or the contextInitialized() method for a ServletContextListener in a web container?
    Question 2.
    Is there any kind of an analog to web.xml for EJB containers? If not, is there some kind of standard way to set initialization parameters for EJBs?
    Question 3.
    Is there any kind of JNDI service provider created for me by my EJB container? For example, the (rather old) article here:
    http://java.sun.com/products/jndi/tutorial/getStarted/examples/naming.html
    suggests the following code:
    import javax.naming.Context;
    import javax.naming.InitialContext;
    import javax.naming.NamingException;
    Hashtable env = new Hashtable();
    env.put(Context.INITIAL_CONTEXT_FACTORY,
        "com.sun.jndi.fscontext.RefFSContextFactory");
    Context ctx = new InitialContext(env);specifically 'Context.INITIAL_CONTEXT_FACTORY, "com.sun.jndi.fscontext.RefFSContextFactory"' looks like a bunch of voodoo to me, and also mentions something about the file system... I don't want my JNDI to have anything to do with my filesystem. Do I need to install some kind of JNDI server or LDAP server or something? Sorry... I'm really confused.
    Question 4.
    In my test application, I'm trying to centralize logging. I have a stateless EJB that implements logging capability. When instantiated, (in theory) it should register it's logging element to JNDI, so that further instantiations of the logging EJB should all direct their calls to the same element.
    I fully realize that this would imply (at best), in a distributed environment, the rather strange behavior of logging calls bouncing around to the first machine that happend to instantiate a logging bean...
    regardless, I have the following broken code:
    import javax.ejb.Stateless;
    import javax.naming.Context;
    import javax.naming.InitialContext;
    import javax.naming.NamingException;
    @Stateless
    public class LogEJB implements VCMarkWeb.log.LogEJBRemote {
        private transient Context context;
        private transient Log     log;
        private transient boolean logMaster = false;
        private int logLevel;
        public
        LogEJB() {               
            try {
                context = new InitialContext();
                Log     globLog = (Log) context.lookup("log");           
                if (log != null){
                    this.log = globLog;
                    return;
                log = new LogWindow(800, 600, "LogBean", 5);
                log.out("Logging born.");
                context.bind("log", log);
                this.logMaster = true;           
            catch (Exception exception) {
                System.out.println("LogEJB: Exception while instantiating.");
                System.out.println(exception.getMessage());
        public void
        finalize() {
            if (!logMaster)
                return;
            try {
                context.unbind("log");
            catch (Exception exception) {
                System.out.println("LogEJB.finalize(): Exception unbinding log.");
                System.out.println(exception.getMessage());
    } Obviously, this code is broken, because my EJB has overridden finalize(), which is apparently not allowed. In this case (since I'm going to have to delete that finalize() method), how could I assure that my reference to a logging element will be unbound once the owner of that logging element is garbage-collected?
    ..or.. if I'm asking Question #5 in too convoluted of a way...
    Question 5'. Say, when my EJB container is kicked off, I want to create a single class containing a swing window, which will exist for the lifetime of the container, to which I can pass a handle to, such that any EJB's can invoke its methods? How would I do that, and how would I pass to my EJBs a handle to said class the 'right way'(tm)?
    Thanks so much for your assistance, J2EE design gurus :)

    singletons are counter to the very concept of distributed computing, which EJB is of course liable to do.
    So while you may have a class that behaves like a singleton inside its own enterprise application context, there is no guarantee it will behave like a singleton when seen from the perspective of a client.
    In fact, when the enterprise application is run in a distributed environment it's guaranteed to not be a singleton anymore as each JVM instance will have its own instance of the class loaded.
    It can get even worse depending on application server architecture, and you may end up having several instances of your "singleton" running inside the same server (possibly the same application) though that is more rare.
    So the best thing to do with singletons is forget all about them.

  • Some J2EE Design Questions

    Hello All,
    1. How can a daemon process/service implemented in J2EE world? Any design pattern?
    2. Is there any way to trap J2EE client disconnect events - we want to timeout
    user sessions if they fail to logout properly from our J2EE app and disconnect
    from App Server
    Thanks in advance for your time in helping me with these design issues.
    MS

    I have the same problem.
    Does anyone know the solution?
    Thanks
    Davide

  • J2EE architecture question

    Suppose you have a distributed application consisting of a number (max 100) of webservers (Servlets/JSPs technology) which send information (e.g. a random number) to one central system (using EJBs). The central system receives the random numbers through a session facade and adds the contributions from the various webservers. When the total reaches a certain level, the central system needs to inform all contributing webservers of the new total.
    My question:
    - What is the best (simple, low-cost, easy to implement) way for the central system to inform the webservers?
    Options I've thought of:
    1. messaging (probably too complicated?)
    2. polling from the webservers (too much traffic?)
    3. central system invoking a Servlet on each webserver (is this practical?)
    Any comments will be greatly appreciated!

    1. messaging (probably too complicated?)Actually quite easy, especially since your app server probably already has a JMS provider. And, if all of your Servlet servers are basically running the same application (e.g. same deployments), you'll only have to write one MessageListener to be placed in the application.
    2. polling from the webservers (too much traffic?)Too much traffic, threading issues, wasteful of processing power - a whole host of problems with that approach.
    3. central system invoking a Servlet on each webserver
    (is this practical?)Then your main EJB application would have to "know" the address of each and every webserver - which gets you into a maintenance nightmare. Not practical at all...

  • J2EE Design Question -- Am I On The Right Track?

    There are multiple tables in my database. Each table has a primary key, and the table that relates to other tables has foreign keys. I have to match the primary key and foreign key to go from one table to another. The specifics are spelled out below:
    The first table has login, pwd, and a primary key as fields, the second table contains completely different fields plus a primary key and foreign keys. The fields in the third table are different from those in the first and second tables plus its primary key. Queries to the third table can be made only if the user login and pwd are found in the first table, and through the second table's relation to the first table and the third table�s relation to the second table.
    The fields of all those tables may be accessed concurrently, but the fields are read-only (for the time being).
    I have a servlet to handle browser interactions. And I have a session bean to handle the workflow and business logic. However, I am confused with the choices between VO and entity beans.
    I first thought that I should use value objects to represent the data fields of the specific rows I looked for in those tables. Here is what I read about Value Object:
    "If a business object merely represents a structure to hold data fields, and the only behavior it provides are get and set method for the fields, then it would be wasteful of system resources to implement it as an enterprise bean. To avoid expensive remote methods calls (system resources and network bandwidth) to get the value of entity object fields, a value object is used to represent the details of the entity object. Only one remote call is required to retrieve the value object and then a client�s request to query the state of the object can then be met via local get methods on this details object."
    On my second thought, I think I should use entity beans to represent the specific rows I am looking for in those tables because I must use primary key and foreign key relations to go from one table to another.
    I do not use DAO because I am using CMP. The first call is within the session bean. It is a remote call to look for a specific row in the first table in my database. Subsequently, the mapping of the row in the first table to the second table, and the mapping of the row in the second table to the third table are all invoked on the �local" interfaces of those entity beans.
    client(browser)-->front controller(servlet)-->session facade(session ejb)-->entity ejb-->entity ejb -- > entity ejb
    Please advise if this is the right design. Am I on the right track? Is there improvement to be made?

    I might not explain my question well in my previous post -- there is no business logic involved in what I am doing to go from the first entity bean to the second entity bean and to go from the second entity bean to the third entity bean.
    Based on the login information, I have to go through those entity beans to find the very specific row in the third table in order to get the data field I need. That is to say, only thing involved is searching for rows.
    In my view, session bean -- > 1st entity bean -- > 2nd entity bean -- > 3rd entity bean
    1. session bean -- > 1st entity bean: remote call and returns the key to the 1st entity bean for locating the 2nd entity bean
    2. 1st entity bean -- > 2nd entity bean: local call and returns the key to the 2nd entity bean for locating the 3rd entity bean
    3. 2nd entity bean -- > 3rd entity bean: local call and then returns the value of the specific field to the session bean
    The alternative approach is:
    session bean
    |
    + + +
    1st entity bean 2nd entity bean 3rd entity bean
    1. session bean -- > 1st entity bean: remote call and returns the key to the session bean for locating the 2nd entity bean
    2. session bean -- > 2nd entity bean: remote call
    and returns the key to the session bean for locating the 3rd entity bean
    3. session bean -- > 3rd entity bean: remote call and the session bean can get the value of the specific field from the 3rd entity bean
    I do not know which approach to go for. Please provide guidance. Thanks.

  • J2EE Security Question

    I am developing an e-commerce application using J2EE1.3.This application enable users to set up their own accounts without administrative intervention.They are prompt to provide some personal information as well as a username and password.This information is stored in the database.Since the security roles are defined at deploy time, my question is: How the application can assign dynamically roles in the users that enter the system?????

    The default security provided is not going to work for you, you will have to create a Custom Realm to implemet your own security mechanism. This will vary depending on which Application Server you are using.

  • J2EE License Question

    Hello all,
    We have installed a Developer Workplace SR2 on our local machines. Before our temporary license was about to expire (Aug 27), we requested for a permanent license. Awkwardly enough, the 'permanent' license's expiration is set to August 28.
    Is it always the case that we need to keep on installing temporary/permanent licenses on our machines for Developer Workplace use?
    Should Developer Workplace J2EE Engine license should have a longer 'permanent' license validity period?
    How do we obtain a license where validity is up to year 9999? If there's a case.
    Thanks.
    Jan.

    Thanks for the response, Kaleem.
    Here are the parameters we used for the request of the license key:
    System Type: Development System
    Product: SAP NetWeaver
    Product Version: SAP NetWeaver 7.0 (2004s)
    Technical Usage: Application Server Java
    Database: MaxDB
    Operating System: NT/INTEL
    Planned Production Date: 15/08/2008
    Any problem you see on this?
    Thanks in advance.
    Jan

  • J2EE SDK question

    There's something I'm missing about the J2EE SDK. Of the components listed, why would I want to download it if I'm going to be using Tomcat as my server and I have the J2SE SDK? Also, where does JSP taglib support come from?

    There's something I'm missing about the J2EE SDK. Of
    the components listed, why would I want to download
    it if I'm going to be using Tomcat as my server and I
    have the J2SE SDK? Also, where does JSP taglib
    support come from?You can work on servlets and JSP without the J2EE SDK. Tomcat has all the libraries you need... even JSP taglib.

  • J2EE Installation Question

    I'm new in java. I have installed J2SE over my machine but if i want J2EE to be installed as well, do i require to uninstall J2SE first?

    Asim_Arif wrote:
    I'm new in java. I have installed J2SE over my machine but if i want J2EE to be installed as well, do i require to uninstall J2SE first?No

  • J2SE to J2EE - general question

    Hi,
    I have an application, made up of several classes, written in J2SE. What does it entail to make these classes J2EE-compliant? changing import statements to include J2EE-specific classes? is it a major overhaul?

    It depends on your application really, by the sounds of it you should first familiarise yourself with J2EE technology.
    A good place to start is the J2EE tutorial
    http://developer.java.sun.com/developer/earlyAccess/j2ee/tutorial.html

  • J2EE newbie question

    hi,
    I just need some clarifying.
    My understanding is that J2EE is simply additional classes and interfaces to what is contained in J2SE. Therefore, is my understanding correct that you cant install J2EE without first having J2SE?
    I only installed J2EE last week. I had J2SE, so when I installed J2EE, is what happened was basically the classes from J2EE were added to the library that was already there? Is this correct?
    Thanks.

    hi,
    I just need some clarifying.
    My understanding is that J2EE is simply additional
    classes and interfaces to what is contained in J2SE.This is a gross understatement. Java EE is a container for EJBs, servlets, JSPs that provides additional services such as messaging, naming, connection pooling, etc. It's a lot more than "additional classes".
    Therefore, is my understanding correct that you cant
    install J2EE without first having J2SE?Java EE requires Java SE. Java SE has the JVM, and you can't run Java EE without it.
    I only installed J2EE last week. I had J2SE, so when
    I installed J2EE, is what happened was basically the
    classes from J2EE were added to the library that was
    already there? Is this correct?No. They should be kept separate.
    %

Maybe you are looking for