Structuring a JSP/J2EE (Tomcat) application

If anyone can give some direction on this, then I'd be very happy.
I am trying to rewrite an application I previously developed in PHP using JSP/J2EE in a Tomcat enviroment. I am rather unsure about how the application and related files should be organised. For instance, should my "own" application-related configuration files (whatever.xml) be stored in the WEB-INF directory? Also, should application-specific log files be stored somewhere in the application structure, or would those typically be located where the server logs are? For application-specific logging, should I use java.util.Logging or something like log4j?
I will be using three different environments (dev, staging and production) for this, and would ideally like to make the application easily configurable to move it between these environments.
Sincerely,
Nils Hagner

hagner wrote:
If anyone can give some direction on this, then I'd be very happy.
I am trying to rewrite an application I previously developed in PHP using JSP/J2EE in a Tomcat enviroment. I am rather unsure about how the application and related files should be organised. For instance, should my "own" application-related configuration files (whatever.xml) be stored in the WEB-INF directory? Also, should application-specific log files be stored somewhere in the application structure, or would those typically be located where the server logs are? For application-specific logging, should I use java.util.Logging or something like log4j?
I will be using three different environments (dev, staging and production) for this, and would ideally like to make the application easily configurable to move it between these environments.Usually you put your own configuration files in the /WEB-INF/classes directory because then they will be in the classloader's classpath.
Log files go in the same log directory as the server logs (in tomcat this is just ${CATALINA_HOME}/logs/)
You can use either the java logging or log4j that is up to you (I think log4j is better personally because it has more features)

Similar Messages

  • Help running a simple jsp file,Tomcat 5.0.16

    Hi,
    This question may be addressed many many times,but do reply.
    I have a Win xp operating system
    Installed Tomcat 5.0.16 in it.
    Next the directory structure
    PS : The sampleapp directory is outside the tomcat installation directory.
    E:/sampleapp
    | |
    ROOT WEB-INF
    |
    classes
    |
    <package1><structure> .class files (for servlet works fine!!!!)
    in the WEB-INF,there is the web.xml,then sourcefiles<dir> and the lib directory which is empty.
    Now the servlet files work fine.........
    I have placed my MyJsp.jsp file in the above mentioned ROOT directory.
    I have not done any thing with the <TOMCAT_HOME>/conf/server.xml file
    and the web.xml which I have written.
    When I give the following URI
    http://localhost:8080/sampleapp/MyJsp.jsp,
    I get the HTTP status 404- /MyJsp.jsp
    description: The requested resource (/MyJsp.jsp) is not available.
    Hoping that I have defined the problem specifically.Kindly show some light on this.
    Thanks
    AS

    Nevermind. I just found the answer. For the record, there are two ways in getting JSPs to work:
    1. Precompiling the JSPs and modifying your webapp's web.xml file with the XML fragment generated in YourWebApp/web/WEB-INF/generated_web.xml;
    2. Not precompiling the JSPs, but simply letting tomcat compile it on the fly on first access.
    PRECOMPILATION METHOD
    Go to http://jakarta.apache.org/tomcat/tomcat-5.0-doc/jasper-howto.html. Copy-and-paste the ant script under the section "Web Application Compilation" into a file called compile.xml. For me, I save it in ~/development/compile.xml. Then compile the JSPs using the command (all in a single line):
    $ANT_HOME/ant -file <PATH_TO_COMPILE.XML> -Dtomcat.home=<$TOMCAT_HOME> -Dwebapp.path=<$WEBAPP_PATH>
    In my case, I cd into the directory where my app resides:
    cd ~/development/HelloWorld
    and then I type:
    ant -file ~/development/compile.xml -Dtomcat.home=/var/tomcat5 -Dwebapp.path=.
    (Note the trailing dot since my current directory is my webapp's directory itself. Also, in my case, my shell's PATH contains the path to the ant executable, so I just type 'ant' directly.)
    Open the file ~/development/HelloWorld/web/WEB-INF/generated_web.xml and follow the instructions in that auto-generated file, which is: "Place this fragment in the web.xml before all icon, display-name, description, distributable, and context-param elements."
    The web.xml referred to above is YOUR web.xml. In my case, it is the one in ~/development/HelloWorld/web/WEB-INF/web.xml
    When ready to deploy, type:
    ant dist
    as usual. Deploy the .war file in the dist directory as you normally would. In my case, I do:
    rm -rf $CATALINA_HOME/webapps/hello* (removes my HelloWorld webapp directory and its war file)
    cp ~/development/HelloWorld/dist/hello.war $CATALINA_HOME/webapps
    and wait for tomcat to unravel the war file. I can then access the JSP page based on whatever the generated_web.xml had specified. In my case, it would be http://localhost:8080/hello/sample.jsp
    NON-PRECOMPILATION METHOD
    Copy tools.jar from the Java JDK into tomcat's common/lib. (I found this only in the error message in tomcat's log file!! Didn't find it anywhere else!!). Do this one time only, then restart tomcat:
    cp $JAVA_HOME/lib/tools.jar $CATALINA_HOME/common/lib
    Restart tomcat.
    Deploy your webapp as usual which will include your JSP files stored under your webapp's 'web' directory. No precompilation of JSPs is required. Then access your JSP pages such as http://localhost:8080/HelloWorld/my-jsp-page.jsp and tomcat will compile it on the fly on first access. The disadvantage is that there will be a slight delay on first access.
    [Note:  I am putting all this down for the record, because it took me MANY HOURS to figure all this out as the info on how to do this is not found clearly in one place!!  Hope this helps others.]
    My next step is to incorporate the contents of compile.xml as mentioned above, into my regular build.xml file.

  • Exception notification through Email in JSP and Tomcat 5.5

    Hi,
    I have developed a Web application using jsp on Tomcat 5.5 web server. I want and email sent to myself if any exception occurs on the server side along with the exception.
    I am not sure if it can be done on JSP or its part of Tomcat configuration.
    I hope you guys could help me
    Thank you

    Check this page:
    http://www.imagescript.com/atg/articles/jsp_j2ee/error_page_basics.htm
    That explains how to set your own error page. Inside that jsp you can use the JavaMail api to send the exception as an email.

  • J2ee Web application exploded format in oracle 10g

    Hi,
    I am trying to develop a simple j2ee application in Exploded Format
    in oracle 10g AS. i have created a new OC4J instance called
    TestOC4j for this. A .war file works fine in this instance.
    I have placed the application under applications directory of TestOC4j.
    I have made entries in server.xml, oc4j_mod.conf,
    default-web-site.xml,http-web-site.xml and application.xml in META-INF
    of the application.
    The application get deployed with no errors.gets created in
    application-deployments too.
    But the url http://server-ipaddress:7778/test_app is not working.
    Please help.
    The folder struture is as follows:
    test_app
    --META-INF
    -----application.xml
    --test_web
    -----pages
    -------welcome.jsp
    -----WEB-INF
    -------web.xml
    -------lib
    -------src
    The entries in server.xml is as follows:
    <application name="test_app" path="../applications/test_app" auto-start="true" />
    <web-site path="./http-web-site.xml" />
    The entries in application.xml is as follows :
    <module>
    <web>
    <web-uri>test_web</web-uri>
    <context-root>/test_app</context-root>
    </web>
    </module>
    The entries in default-web-site.xml is as follows:
    <web-app application="test_app" name="test_web" load-on-startup="true" root="/test_app" />
    The entries in http-web-site.xml is as follows:
    <web-app application="test_app" name="test_web" load-on-startup="true" root="/test_app" />
    The entries in oc4j_mod.conf is as follows:
    Oc4jMount /test_app TestOC4j
    Oc4jMount /test_app/* TestOC4j
    Regards,
    Roopa

    Roopa, it looks like there is no problem with the deployment of your application in exploded format. Have you accessed http://server-ipaddress:7778/test_app/pages/welcome.jsp? Any problem access http://server-ipaddress:7778/j2ee/, the default home page of the default-web-app ?
    When you say the url http://server-ipaddress:7778/test_app is not working, what is the error message if any on the browser, on server console, in the server.log and http-web-access.log of ORACLE_HOME/j2ee/home/log/, ORACLE_HOME/j2ee/home/application-deployments/test_app/application.log?

  • How to run jsp using  tomcat server?

    hai friends,
    i'm using jsp for my application and for that i'm using tomcat server.
    i was runing my jsp files like this
    http://localhost:8080/examples/jsp/myapp/index.jsp but instead of this
    i need to run my jsp files like this
    http://localhost:8080/myapp/index.jsp
    what r the changes that i should do in tomcat installation to run myapplication in such a way.
    thanks in advance

    you need to redefine the server root...
    for that do the following...
    copy all the directory tree rooted at
    JAKARTA-HOME/webapps/ROOT/examples/jsp/myapp/ to
    JAKARTA-HOME/webapps/ROOT/myapp/
    -OR-
    in the server.xml, search for "Tomcat Root Context" and un-comment the code defining Root Context...
    change the docBase value from "ROOT" to "ROOT/examples/jsp"
    that shud help...
    -Pranav
    hai friends,
    i'm using jsp for my application and for that i'm
    using tomcat server.
    i was runing my jsp files like this
    http://localhost:8080/examples/jsp/myapp/index.jsp but
    instead of this
    i need to run my jsp files like this
    http://localhost:8080/myapp/index.jsp
    what r the changes that i should do in tomcat
    installation to run myapplication in such a way.
    thanks in advance

  • Unable to load Applet in JSP using Tomcat 5.5.12

    Hi
    I am aunable to applet in jsp using Tomcat 5.5.12 and JRE 1.5. Below is the code that I am using
                                       <applet
                                       codebase = "."
                                       archive = "WebPOSApplet.jar"
                                       code = "webposprint.WPMainApplet.class"
                                       name = "Trans Applet"
                                       width = "450"
                                       height = "115"
                                       hspace = "0"
                                       vspace = "0"
                                       align = "middle"
                                       >
    <param name = "redirectInfo" value = "SearchProducts.do">
                                       </applet>
    <%/*%>
    <OBJECT
                                       classid = "clsid:CAFEEFAC-0014-0002-0000-ABCDEFFEDCBA"
                                       codebase = "http://java.sun.com/products/plugin/autodl/jinstall-1_4_2-windows-i586.cab#Version=1,4,2,0"
                                       WIDTH = 450 HEIGHT = 115 >
    <PARAM NAME = CODE VALUE = webposprint.WPMainApplet.class>
    <PARAM NAME = archive VALUE = WebPOSApplet.jar>
    <PARAM NAME = "type" VALUE = "application/x-java-applet;jpi-version=1.4.2">
    <param name = "redirectInfo" value = "SearchProducts.do">
    <PARAM NAME = "scriptable" VALUE = "false">
    <PARAM NAME = model VALUE=models/buckminsterfullerine.xyz>
    <embed width="450" height="115" code="webposprint.WPMainApplet.class" archive="WebPOSApplet.jar" type="application/x-java-applet;jpi-version=1.4.2" redirectinfo="SearchProducts.do" scriptable="false" model="models/buckminsterfullerine.xyz" src="webposprint.WPMainApplet.class">
    </embed> <COMMENT> <EMBED
                                       type = "application/x-java-applet;jpi-version=1.4.2" \
                                       CODE = webposprint.WPMainApplet.class\
                                                 archive = WebPOSApplet.jar\
                                       WIDTH = 373 \
                                       HEIGHT = 167 \
                                       model =models/buckminsterfullerine.xyz \
                                            scriptable = false \
                                            pluginspage = "http://java.sun.com/products/plugin/index.html#download"> <NOEMBED>
    alt="Your browser understands the <APPLET>
    tag but isn't running the applet, for some reason."
    Your browser is completely ignoring the <APPLET>
    tag! </NOEMBED> </EMBED> </COMMENT>
    </OBJECT>
    <%*/%>
    This code doesn't seems working with Tomcat 5.5.12. I works fine with Tomcat 4.1.31
    Please help
    Thanks

    Applets run client side - which means the relevant class files need to be downloaded to the client.
    Anything under the WEB-INF directory is not directly accessible by the client. Nothing under WEB-INF can be downloaded.
    ergo, specifying the WEB-INF directory as part of your applet codebase is a bad idea.
    I would suggest try copying the applet classes from under WEB-INF to some other place in your application.
    Also, you should probably specify the full class name of your Applet in the plugin tag.
    <%@ page import="com.util.MyApplet" %>
    <jsp:plugin type="applet" code="com.util.MyApplet" codebase="/classes" width="250" height="100" jreversion="1.6">
         <jsp:fallback>
              <B>Unable to start plugin!</B>
         </jsp:fallback>
    </jsp:plugin>cheers,
    evnafets

  • How to deploy JSPs in Tomcat 5.5

    hello all
    i am Mayuresh Trivedi. i don't know how to Deploy Jsps in Tomcat 5.5. i m using MYSql as Backend. i m trying to use "import" command in Jsp so it shows me error like under :
    type Exception report
    message
    description The server encountered an internal error () that prevented it from fulfilling this request.
    exception
    org.apache.jasper.JasperException: Unable to compile class for JSP
    Generated servlet error:
    Syntax error on token "import", delete this token
    Generated servlet error:
    Syntax error on token "import", delete this token
         org.apache.jasper.compiler.DefaultErrorHandler.javacError(DefaultErrorHandler.java:84)
         org.apache.jasper.compiler.ErrorDispatcher.javacError(ErrorDispatcher.java:328)
         org.apache.jasper.compiler.JDTCompiler.generateClass(JDTCompiler.java:397)
         org.apache.jasper.compiler.Compiler.compile(Compiler.java:288)
         org.apache.jasper.compiler.Compiler.compile(Compiler.java:267)
         org.apache.jasper.compiler.Compiler.compile(Compiler.java:255)
         org.apache.jasper.JspCompilationContext.compile(JspCompilationContext.java:556)
         org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:296)
         org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:295)
         org.apache.jasper.servlet.JspServlet.service(JspServlet.java:245)
         javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
    note The full stack trace of the root cause is available in the Apache Tomcat/5.5.7 logs.
    so , can any body help me please ?

    hi
    first create a arbitrary folder in \webapp folder in tomcat home foder.
    for instance \webapp\myJSP
    second you must create a folder with this name : \WEB-INF under myJSP folder
    then make a web.xml in that
    so write in web.xml this :
    <web-app xmlns="http://java.sun.com/xml/ns/j2ee"
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd"
    version="2.4">
    <description>
    myJSP
    </description>
    <display-name>JSP 2.0 Examples</display-name>

  • Deploying BC4J as J2EE compliant applications

    Hi.
    I've been looking over the threads concerning deployment of BC4J applications into oc4j.
    Maybe I have missed the concept of bc4j, but doesn't bc4j act as 'just another runtime library' and be deployed as a standard J2EE library, i.e:
    war-file->
    /WEB-INF/classes/<all the java-classes, including bc4j packages>
    /WEB-INF/web.xml
    /WEB-INF/lib/<bc4j runtime libraries>
    /<jsp,html,images etc.>
    It seems to me that BC4J is not really adapted to a J2EE environment. For example, local file access from an EJB application is a big no-no in the specs.
    Is there any plans for a rewrite of bc4j to make it more 'J2EE-compliant'?
    Best Regards /Anders

    You could deploy the BC4J archives along with each and every WAR file if you want, but this is kind of a waste. Instead, you typically deploy them in the global library directory of your container.
    BC4J reads resources from the application context for things like metadata files. Have you found this issue to stop you from successfully running BC4J applications as J2EE EJB Session Beans?
    Remember the J2EE includes both Servlets and EJB's. Some customers shy away from the additional complexity of EJB's and build J2EE-compliant applications that work entirely in the J2EE "Web Tier" without using the "J2EE EJB Tier" as well.
    BC4J-powered J2EE applications support deploying application components either to the J2EE Web Tier or to the J2EE EJB Tier without requiring code changes.

  • JSP Apache-Tomcat

    I have a problem running a JSP program in a second PC.
    In the first PC I am running Apache-Tomcat and I execute the program with this command in a browser:
    http://localhost:8080/jspexamples/myJSPs/almacen/Venta01.jsp
    It works OK.
    I also have the C:\jakarta-tomcat-5.0.28 as a shared folder and I turn off the firewalls.
    In the second PC I am trying to run the same program using this command in the browser:
    http://192.168.15.5/jspexamples/myJSPs/almacen/Venta01.jsp
    This 192.168.15.5 is the IP address of the server PC (first PC), which is running the Apache-Tomcat. The program does not run.
    P.D.: The program is in the first PC in the folder:
    C:\jakarta-tomcat-5.0.28\webapps\jspexamples\myJSPs\almacen
    Thanks, John

    Try http://192.168.15.5:8080/jspexamples/myJSPs/almacen/Venta01.jsp
    When you create web application, it should be placed in separate. The default place is ${CATALINA_BASE}\webapps. Do not add your jsps in existing application (jspexamples in this case).
    I also have the C:\jakarta-tomcat-5.0.28 as a shared folder and I turn off the firewalls.This folder can be (and should be) unshared. Tomcat listens port 8080 (by default configuation), you can turn on your firewall, allow connections for 8080 port and all will work! (at least, all can work in theory :) )

  • Deployment of JSP based Web Application

    Hey I am new to JSP. I want to create a Web Application with JSP and Tomcat 5 as the Web Server.
    I know how to use JSP, but don't know about Tomcat.
    If any one can tell me how to deploy a web application on Tomcat 5???
    Thanks

    One way is to follow the instructions that come with Tomcat.
    http://jakarta.apache.org/tomcat/tomcat-5.0-doc/appdev/index.html

  • How a J2EE web application access CR reports stored on the CR Server XI?

    Hi,
    I'll be working on some crystal report templates that will eventually be hosted/publish on the CR Server XI.
    My questions are:
    1. How my J2EE web application access those reports?
    2. Do my web application uses some CR API for the connectivity and integration?
    3. What will happen to the database connectivity of the report template? since the report are created locally.
    4. Can the report template be edited/updated on the server?
    5. How the CR XI login functionality be involve in the integration (web application ---> CR Server XI)?
    6. Is the J2EE web application be deployed on similar web/application server where the CR Server XI resides?
    7. What is the role of RAS, Universe, Business View Manager to this whole CR integration?
    I hope you can provide some guidance on this journey to Crystal Report world
    Regards,
    Rulix Batistil
    Genesis Networks Pte Ltd
    www.gen-net.com.sg

    1) Your application connects via the Java SDK using the appropriate JAR files.
    2) It can.  You can set the database information at runtime or use the already populated information from Enterprise.
    3) Same as 2.   Typically when you save the report to Enterprise you set up the database information there so that it runs against the database you want without prompting.  You can change this via code to hit whatever equivalent database you want.
    4) Yes.  You would have to use RAS and the RCAPI to accomplish this via code.  You can also make changes in the designer and overwrite the existing report template.
    5) You will log in via code. The information on how to do so is in the SDK documentation, which I will link.
    6) It can be deployed to the same machine as CR Server, though we recommend against that.  Typically you will want to deploy it to a seperate web server and allow it to connect to the CR Server across the network.
    7) RAS can be used to run reports, as well as the page server.  The universe and business view manager are not directly used in code.  If a report runs against a universe or business view then it will use them for data, but you wouldnt do anything with them directly.
    [BOE Developer Library|http://devlibrary.businessobjects.com/BusinessObjectsXIR2SP2/en/devsuite.htm]
    You will find the Java SDK information under the BusinessObjects Enterprise SDK section.
    Best Regards,
    Jason

  • How to call a JSP page from Applications menu?

    Hi partners,
    I am still looking for "how to call a JSP page from Applications menu?", I mean instead of calling a form, I want to call a JSP page which is staying in a OC4J repository which is located in another server.
    Any idea will be really appreciated.
    Thanks in advance.
    Frank Mtz.

    Hi Frank,
    if u know the solution please share it with me. i'm looking for the same scenario.
    thanks in advance,
    anish

  • Deploying a J2EE web application in Oracle 10g

    Hi friends,
    <br>
    I had worked with Oracle9i 9.0.3 . But it's my first experience with Oracle 10g . I have installed Oracle 10g Infrastructure , Metadata Repository and one Middle tier - Forms and i hope i have followed The Oracle 10g installation guide Properly. Anyway installation is successful.
    The problem is a J2EE web application which is deployed properly on Oracle9i 9.0.3 doesn't get deployed in Oracle 10g. The following is the exception :
    <br>
    Deployment failed: Nested exception
    Root Cause: deploy failed!: ; nested exception is:
    oracle.oc4j.admin.internal.DeployerException: Error initializing ejb-module; Exception Error in application Spom_Apps: Error loading package at file:/C:/Oracle/Ora9iASForms/j2ee/home/applications/Spom_Apps/JmsSubscriberMdb.jar, Error deploying file:/C:/Oracle/Ora9iASForms/j2ee/home/applications/Spom_Apps/JmsSubscriberMdb.jar homes: No location set for Topic resource MessageDrivenBean JmsReceiverMdb
    <br>
    <br>
    where JmsReceiverMdb is the deployment file containing the message driven beans.
    <br>
    Thanks in advance,
    paskal

    Hi,
    Thanks for responding . I am sending the file contents of ejb-jar.xml, orion-ejb-jar.xml, jms.xml.
    Could you also check whether dtds versions of 10g and 9i in these xmls are conflicting? If you can specify your email-id i can send these file as attachments.
    Hope you could strike the right spot.
    ejb-jar.xml
    <?xml version = '1.0' encoding = 'windows-1252'?>
    <!DOCTYPE ejb-jar PUBLIC "-//Sun Microsystems, Inc.//DTD Enterprise JavaBeans 2.0//EN" "http://java.sun.com/dtd/ejb-jar_2_0.dtd">
    <ejb-jar>
    <enterprise-beans>
    <session>
    <description>Session Bean ( Stateless )</description>
    <display-name>spomPmConfigSSB</display-name>
    <ejb-name>spomPmConfigSSB</ejb-name>
    <home>jnipackage.spomPmConfigSSBHome</home>
    <remote>jnipackage.spomPmConfigSSB</remote>
    <ejb-class>jnipackage.impl.spomPmConfigSSBBean</ejb-class>
    <session-type>Stateless</session-type>
    <transaction-type>Container</transaction-type>
    </session>
    <message-driven>
    <description>Message Driven Bean</description>
    <display-name>JmsReceiverMdb</display-name>
    <ejb-name>JmsReceiverMdb</ejb-name>
    <ejb-class>jnipackage.impl.JmsReceiverMdbBean</ejb-class>
    <transaction-type>Container</transaction-type>
    <acknowledge-mode>Auto-acknowledge</acknowledge-mode>
    <resource-ref>
    <res-ref-name>jms/alarmTopicConnectionFactory</res-ref-name>
    <res-type>javax.jms.TopicConnectionFactory</res-type>
    <res-auth>Container</res-auth>
    <res-sharing-scope>Shareable</res-sharing-scope>
    </resource-ref>
    <resource-env-ref>
    <resource-env-ref-name>jms/alarmTopic</resource-env-ref-name>
    <resource-env-ref-type>javax.jms.Topic</resource-env-ref-type>
    </resource-env-ref>
    </message-driven>
    </enterprise-beans>
    <assembly-descriptor>
    <container-transaction>
    <method>
    <ejb-name>JmsReceiverMdb</ejb-name>
    <method-name>*</method-name>
    </method>
    <trans-attribute>Required</trans-attribute>
    </container-transaction>
    <container-transaction>
    <method>
    <ejb-name>spomPmConfigSSB</ejb-name>
    <method-name>*</method-name>
    </method>
    <trans-attribute>Supports</trans-attribute>
    </container-transaction>
    </assembly-descriptor>
    </ejb-jar>
    Orion-ejb-jar.xml
    <?xml version = '1.0' encoding = 'windows-1252'?>
    <!DOCTYPE orion-ejb-jar PUBLIC "-//Evermind//DTD Enterprise JavaBeans 1.1 runtime//EN" "http://xmlns.oracle.com/ias/dtds/orion-ejb-jar.dtd">
    <orion-ejb-jar>
    <enterprise-beans>
    <message-driven-deployment name="JmsReceiverMdb" max-instances="100" min-instances="0">
    <resource-ref-mapping name="jms/alarmTopicConnectionFactory"/>
    </message-driven-deployment>
    <session-deployment name="spomPmConfigSSB"/>
    </enterprise-beans>
    <assembly-descriptor>
    <default-method-access>
    <security-role-mapping impliesAll="true" name="&lt;default-ejb-caller-role>"/>
    </default-method-access>
    </assembly-descriptor>
    </orion-ejb-jar>
    jms.xml
    <?xml version="1.0" standalone='yes'?>
    <!DOCTYPE jms-server PUBLIC "OC4J JMS server" "http://xmlns.oracle.com/ias/dtds/jms-server-9_04.dtd">
    <jms-server port="9127">
    <!-- Queue bindings, these queues will be bound to their respective
    JNDI path for later retrieval -->
    <queue name="Demo Queue" location="jms/demoQueue">
    <description>A dummy queue</description>
    </queue>
    <!-- Topic bindings, these topic will be bound to their respective
    JNDI path for later retrieval -->
    <topic name="Demo Topic" location="jms/demoTopic">
    <description>A dummy topic</description>
    </topic>
    <!-- Topic bindings, these topic will be bound to their respective
    JNDI path for later retrieval -->
    <topic name="AlarmQueue" location="jms/alarmTopic">
    <description>A topic</description>
    </topic>
    <topic name="FaultTextQueue" location="jms/faultTextTopic">
    <description>A topic</description>
    </topic>
    <topic name="FaultTopologyQueue" location="jms/faultTopologyTopic">
    <description>A topic</description>
    </topic>
    <!-- path to the log-file where JMS-events/errors are stored -->
    <log>
    <file path="../log/jms.log"/>
    <!-- Uncomment this if you want to use ODL logging capabilities
    <odl path="../log/jms/" max-file-size="1000" max-directory-size="10000"/>
    -->
    </log>
    <queue name="jms/OracleSyndicateQueue" location="jms/OracleSyndicateQueue">
    <description>Oracle Syndication Services Queue</description>
    </queue>
    <!--
    <queue-connection-factory name="jms/OracleSyndicateQueueConnectionFactory"
    location="jms/OracleSyndicateQueueConnectionFactory"/>
    -->
    <queue-connection-factory location="jms/OracleSyndicateQueueConnectionFactory"/>
    <queue name="jms/OracleUddiReplicationQueue"
    location="jms/OracleUddiReplicationQueue">
    <description>Queue for replication scheduler</description>
    </queue>
    <!--
    <queue-connection-factory
    name="jms/OracleUddiReplicationQueueConnectionFactory"
    location="jms/OracleUddiReplicationQueueConnectionFactory"/>
    -->
    <queue-connection-factory location="jms/OracleUddiReplicationQueueConnectionFactory"/>
    <queue name="jms/OracleWebClippingQueue"
    location="jms/OracleWebClippingQueue">
    <description>Queue for Web Clipping</description>
    </queue>
    <!--
    <queue-connection-factory
    name="jms/OracleWebClippingQueueConnectionFactory"
    location="jms/OracleWebClippingQueueConnectionFactory"/>
    -->
    <queue-connection-factory location="jms/OracleWebClippingQueueConnectionFactory"/>
    </jms-server>

  • Problems compiling jsp on Tomcat

    I am getting an error message when I try to run jsp files on the Tomcat server. It runs the txt files fine. Using the 8080 port. Any suggestions about what is going wrong? This is my first time to run jsp or Tomcat on this computer. Thank you. Sorry for the long error message.
    Apache Tomcat/4.0.1 - HTTP Status 500 - Internal Server Error
    type Exception report
    message Internal Server Error
    description The server encountered an internal error (Internal Server Error) that prevented it from fulfilling this request.
    exception
    org.apache.jasper.JasperException: Unable to compile class for JSPNote: sun.tools.javac.Main has been deprecated.
    error: Invalid class file format in C:\Program Files\Java\jre1.5.0_04\lib\rt.jar(java/lang/Object.class).
    The major.minor version '49.0' is too recent for this tool to understand.
    C:\Program Files\Apache Tomcat 4.0\work\localhost\myapp\project3a$jsp.java:0: Class java.lang.
    Object not found in class javax.servlet.GenericServlet.
    package org.apache.jsp;
    ^
    2 errors, 1 warning
         at org.apache.jasper.compiler.Compiler.compile(Compiler.java:284)
         at org.apache.jasper.servlet.JspServlet.loadJSP(JspServlet.java:546)
         at org.apache.jasper.servlet.JspServlet$JspServletWrapper.loadIfNecessary(JspServlet.java:177)
         at org.apache.jasper.servlet.JspServlet$JspServletWrapper.service(JspServlet.java:189)
         at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:382)
         at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:474)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
         at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:247)
         at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:193)
         at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:243)
         at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:566)
         at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472)
         at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
         at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:201)
         at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:566)
         at org.apache.catalina.valves.CertificatesValve.invoke(CertificatesValve.java:246)
         at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:564)
         at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472)
         at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
         at org.apache.catalina.core.StandardContext.invoke(StandardContext.java:2344)
         at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:164)
         at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:566)
         at org.apache.catalina.valves.ErrorDispatcherValve.invoke(ErrorDispatcherValve.java:170)
         at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:564)
         at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:170)
         at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:564)
         at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:462)
         at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:564)
         at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472)
         at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
         at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:163)
         at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:566)
         at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472)
         at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
         at org.apache.catalina.connector.http.HttpProcessor.process(HttpProcessor.java:1011)
         at org.apache.catalina.connector.http.HttpProcessor.run(HttpProcessor.java:1106)
         at java.lang.Thread.run(Unknown Source)

    It looks like it is running multiple versions of Java.
    It looks like you are trying to run with java 1.5
    Check what your JAVA_HOME variable is set to
    Do you have any other versions of java installed on the machine?

  • Get URL for J2EE client application

    Please forgive me if this question has an obvious answer, but I can't see it.
    Once Web Start has downloaded and started my J2EE Swing application client, how can my client get the name of the host (or entire URL) from which the client was downloaded?
    I would rather not have to hard code this into my client, so that the WAR file I deploy to the server is platform independent.
    bobj5000

    Use the JNLP BasicSevice API getCodeBase() to get the URL of the server.
    BasicService bs = (BasicService)ServiceManager.lookup("javax.jnlp.BasicService");
    URL url = bs.getCodeBase();
    Hope this helps
    Jeff

Maybe you are looking for