User: starksm Date: 01/07/28 10:41:05 Modified: . jboss-tomcat.jsp Log: Send readers to one of the JBoss/servlet container bundles as this doc is obsoleted by the preconfigured bundles. Revision Changes Path 1.3 +299 -293 newsite/jboss-tomcat.jsp Index: jboss-tomcat.jsp =================================================================== RCS file: /cvsroot/jboss/newsite/jboss-tomcat.jsp,v retrieving revision 1.2 retrieving revision 1.3 diff -u -r1.2 -r1.3 --- jboss-tomcat.jsp 2001/06/15 22:55:53 1.2 +++ jboss-tomcat.jsp 2001/07/28 17:41:04 1.3 @@ -1,293 +1,299 @@ -<jsp:include page="head.jsp" flush="true" /> -<jsp:include page="slogan.jsp" flush="true" > - <jsp:param name="SLOGAN" value="JBoss/Tomcat/Apache"/> -</jsp:include> - - - - <p class="head">A FULL J2EE STACK - - - <p class="text"><img height="71" width="100" src="pictures/tomcat_3.gif" align="left">The - JBoss organization wants to deliver a complete J2EE based product to the market. - The JBoss organization decided to integrate the Tomcat engine stack with a running - version of JBoss in a single VM. Now you can serve all your servlet and JSP needs - with 2 simple downloads and a couple of configuration files. Check out the - Tomcat <a href="http://jakarta.apache.org" target="_top">homepage</a> for - information related to Tomcat. - <p>The goal of this page is to explain how to make JBoss automatically start Tomcat, - so that it runs in the same VM.</p> - <p>We now run optimized stacks the JSP/Servlet engine talks natively with - the EJB engine resulting in dramatic speed increases. Without the optimization - the invocation is through the network layer. With the optimized layers the - invocation is native, inVM, within the same stack of APIs - - - <p class="head">FEATURES - - - <p class="text"> - <ul> - <li>Parsing of server.xml for full Tomcat configuration support - <li>Support for Tomcat 3.2 and up - <li>Coming support for Catalina - <li>Full j2ee integration in JMX - <li>single startup/shutdown script - <li>Separated stacks inVM - <li>Integrated stacks inVM - <li>J2EE deployer for JBoss/Tomcat - <li>Full EAR support - <li>JBoss Auto-Deploy for EAR - <li>JNDI shared visibility - <li>Integrated Security Model - </ul> - - - - <p class="head">MAILING LISTS - - - <p class="text">Refer to Tomcat's <a href="http://jakarta.apache.org" target="_top">homepage</a> for questions specific to Tomcat deployment. - -<p>Questions about the J2EE deployer and the integration should be posted - to <a href="lists.jsp">our lists</a> (jboss) -<p class="head">DISTRIBUTION AND CVS - - - <p class="text"> - -<p> JBoss Tomcat is shipped as part of the <a href="binary.jsp">standard JBoss/Server - package</a>. However, the current distribution is based on an earlier version - of EmbeddedTomcat that does not parse Tomcat's server.xml. If you don't need - server.xml parsed (ie, you're not trying to integrate with Apache), then the - current version may be the easiest route for you. </p> - <p> - The Pre-2.1 CVS source contains a new version of EmbeddedTomcat - (plus other enhancements) that does parse Tomcat's server.xml. - It is recommended that you use the information provided below. This - new version of EmbeddedTomcat will be rolled in to the official 2.1 - release. - <br> - </p> - - - - <p class="head">HOWTO EMBEDDEDTOMCAT - - - <p class="text">You will need - <ul> - <li><a href="/zip_archives/">JBoss Pre-2.1 Src</a> - <li><a href="http://jakarta.apache.org/builds/jakarta-tomcat/release/v3.2.1/bin/">Tomcat Version 3.2</a> - </ul> - <p>You can get the latest CVS version of JBoss Pre-2.1 from - <a href="/zip_archives/">here</a>. Grab both jboss-cvs.zip and - contrib-cvs.zip to build JBoss and EmbeddedTomcat. - </p> - <p>You can get the latest release of tomcat from the jakarta website. NOTE: This has been tested with tomcat 3.2.1 However it won't run on tomcat 3.1, and tomcat 3.3 is not suppported yet.</p> - - <ol> - <li><strong>Build JBoss from src</strong> <br> - Build JBoss from the CVS sources. This is generally accomplished - by changing to the src/build directory and executing build.sh (or - build.bat on NT). The build creates a dist directory under the - src root. This dist directory will be referred to as the JBOSS_HOME - for the EmbeddedTomcat build. - <br> - <br> - <li><strong>Build EmbeddedTomcat(optional)</strong> <br> - Build the EmbeddedTomcat service from the contrib CVS sources - if you want. This is optional as the current JBoss cvs src - includes a prebuilt version of the tomcat-service.jar. - To build the EmbeddedTomcat service, change to the - contrib/tomcat/src/build directory and execute build.sh - (or build.bat on NT). NOTE: You need to define environment - values for JBOSS_HOME and TOMCAT_HOME to fit your - environment. JBOSS_HOME needs to point to the dist directory of - the JBoss build step and TOMCAT_HOME is the dist directory of the - jakarta-tomcat-3.2.x release. - <br> - <br> - Once this build completes, execute <i>build.sh client</i>. - This will create a new tomcat-test.ear. - <br> - <br> - Once you've built EmbeddedTomcat, - copy contrib/tomcat/tomcat-service.jar to $JBOSS_HOME/lib/ext. Finally, - copy contrib/tomcat/tomcat-test.ear to $JBOSS_HOME/deploy. - <br> - <br> - <li><strong>Add the tomcat libs to the server classpath</strong> <br> - In JBOSS_HOME/conf/default/ edit jboss.conf file to uncomment the - ClassPathExtension mbean for the tomcat lib directory to:<br> - <pre> -<!--Uncomment to add Tomcat classes to classpath --> -<MLET CODE = "org.jboss.util.ClassPathExtension" ARCHIVE="jboss.jar" CODEBASE="../../lib/ext/"> - <ARG TYPE="java.lang.String" VALUE="TOMCAT_HOME/lib/"> - <ARG TYPE="java.lang.String" VALUE="Tomcat"> -</MLET> -</pre> - where TOMCAT_HOME value must be set to the full path described above in - the build of the EmbeddedTomcat service. Note that there must be - a trailing slash(/) in order for the jars in the lib directory to - be added to the classpath. - - <li><strong>Edit jboss.jcml</strong><br> - In JBOSS_HOME/conf/default/ edit the jboss.jcml file to uncomment - the EmbeddedTomcatService mbean. Locate: - <pre> - <!-- - Uncomment to add embedded tomcat service - <mbean code="org.jboss.tomcat.EmbeddedTomcatService" name="DefaultDomain:service=EmbeddedTomcat" /> - --> -</pre> - and uncomment the mbean line so it reads as follows: - <pre> - <!-- - Uncomment to add embedded tomcat service - --> - <mbean code="org.jboss.tomcat.EmbeddedTomcatService" name="DefaultDomain:service=EmbeddedTomcat" /> -</pre> - <p> Further down in the jboss.jcml file, make - sure your J2eeDeployer is set as: </p> - <pre> - <mbean code="org.jboss.deployment.J2eeDeployer" name="J2EE:service=J2eeDeployer"> - <attribute name="DeployerName">Default</attribute> - <attribute name="JarDeployerName">:service=ContainerFactory</attribute> - <attribute name="WarDeployerName">:service=EmbeddedTomcat</attribute> - <mbean> -</pre> - <li><strong>Edit Tomcat's server.xml</strong> <br> - Add the following lines to server.xml in TOMCAT_HOME/conf/ - <pre> -<!-- JBoss, Setup the class loader heirarchy to enable in VM call optimization. - Add after the org.apache.tomcat.context.WorkDirInterceptor ContextInterceptor ---> - <ContextInterceptor className="org.jboss.tomcat.ContextClassLoaderInterceptor" /> -<!-- JBoss, Add the jboss-web.xml parser. Add after the org.jboss.tomcat.ContextClassLoaderInterceptor - ContextInterceptor ---> - <ContextInterceptor className="org.jboss.tomcat.naming.JbossWebXmlReader" /> -<!-- JBoss, Set the request thread classloader. Add before the org.apache.tomcat.request.SessionInterceptor - RequestInterceptor ---> - <RequestInterceptor className="org.apache.tomcat.request.Jdk12Interceptor" /> -<!-- JBoss, Map the current web user to the SecurityAssociation principal. Add - after the org.apache.tomcat.request.SimpleRealm RequestInterceptor ---> - <RequestInterceptor className="org.jboss.tomcat.security.JbossRealm" /> -</pre> - <li><strong>Adding javac to the server classpath</strong> <br> - If you are going to be using JSP files with tomcat, you - need to add the JDK lib/tools.jar file to the classpath to - pickup the javac compiler. You can do this by either - setting your CLASSPATH env variable, by editing run.sh/run.bat - to add tools.jar to CLASSPATH, or by copying tools.jar to - the TOMCAT_HOME/lib directory. - <li><strong>Start JBoss</strong> <br> - If you start JBoss now by typing <code>run.sh</code> - (or <code>run.bat</code> for Windows) you should - see the following Tomcat related output in your - log messages: - <pre> -Using configuration "default" -[Info] Java version: 1.3.0_01,Sun Microsystems Inc. -[Info] Java VM: Java HotSpot(TM) Server VM 1.3.0_01,Sun Microsystems Inc. -[Info] System: Linux 2.2.16-22,i386 - ... -[EmbeddedTomcat] Starting -[EmbeddedTomcat] Starting EmbeddedTomcat.... -2001-02-20 05:01:23 - ContextManager: Adding context Ctx( /examples ) -2001-02-20 05:01:23 - ContextManager: Adding context Ctx( /admin ) -[EmbeddedTomcat] Starting tomcat. Check logs/tomcat.log for error messages -2001-02-20 05:01:23 - ContextManager: Adding context Ctx( ) -2001-02-20 05:01:23 - ContextManager: Adding context Ctx( /test ) -2001-02-20 05:01:25 - PoolTcpConnector: Starting HttpConnectionHandler on 8080 -2001-02-20 05:01:25 - PoolTcpConnector: Starting Ajp12ConnectionHandler on 8007 -[EmbeddedTomcat] OK -[EmbeddedTomcat] Started - ... -[Default] JBoss PRE-2.1 Started in 0m:14s -</pre> - <p>That's it !! Note that the connection handlers - are configured from Tomcat's server.xml file. - </ol> - - - </table> - - - - <p class="head">HOWTO PACKAGE AND DEPLOY AN EAR ON JBOSS/TOMCAT - - - <p class="text">In order to benefit from the classloader integration, you have to deploy your application in an EAR file as recommended by the <a href="http://java.sun.com/j2ee/download.html#platformspec">J2EE specification</a>. - - <p class="text">In case you don't want to read all the J2EE spec, here is a brief summary of what you have to do:</p> - <ol> - - <li>Write your beans and package them in an ejb-jar file. You don't have to - do anything special here. See the <a href="doco_files/jaws.dtd">manual</a> - for details on how to package beans for JBoss.<br> - - <li>Write your servlets/JSPs and package them in a war file.<br> - Add a Class-Path attribute to your war files MANIFEST.MF file to reference - your beans package. for detailed information on that see: <a href="/documentation/HTML/ch11.html">J2eeDeployment - Howto</a>.<br> - Assuming you have a bean deployed under the jndi name "myBean", the calls to this bean from your servlets will look like that: - <pre>MyBeanHome home = (MyBeanHome)new InitialContext().lookup("myBean"); -MyBean bean = home.create();</pre> - <p class="text">Notes:</p> - <ul> - <li>Since JBoss takes care of the classloader stuff, you don't have to include much in the WEB-INF/lib directory: you don't need any of your beans interfaces, and you don't need the old jboss-client.jar, jnp-client.jar... - </ul> - <br> - <li>Package your application in an ear file.<br> - An ear file is a jar archive which contains: - <ul> - <li>Your jar files - <li>Your war files - <li>A deployment descriptor for your application. This file must be named "application.xml", and must be located in the META-INF directory in the ear archive. This file tells JBoss which modules are EJBs, which ones are web modules, and the context paths for the web-modules. Here is a sample application.xml file: - <pre><?xml version="1.0" encoding="ISO-8859-1"?> - -<application> - <display-name>My application</display-name> - - <module> - <web> - <web-uri>webmodule.war</web-uri> - <context-root>/servlets</context-root> - </web> - </module> - - <module> - <ejb>beans.jar</ejb> - </module> - -</application></pre> - <p class="text">See also the <a href="http://java.sun.com/j2ee/dtds/application_1_2.dtd">DTD</a> for application.xml on Javasoft's website.</p> - </ul> - <li>Deploy your ear file.<br> - Option 1: Copy your ear file to JBOSS_HOME/deploy (wow!) - <br> - Option 2: Surf to http://yourhost:8082, and find the - J2eeDeployer service. Give it the URL of your ear file (don't forget the protocol, be it http: or file:), and click on the deploy button.<br> - - <li>That's it!<br> - The server console should show your application being deployed - on Tomcat and JBoss, and your web module should be available - on http://yourhost:8080/servlets (assuming the context-root was "/servlets"). - <p> - Note: Even though JBoss and Tomcat are - cooperating to dynamically deploy your application, Apache must - be configured manually. This means that for your application - to be visible through Apache, you must setup the appropriate - JkMount statements in mod_jk.conf. - </p> - </ol> - <p class="text">For a full example including a servlet and an EJB, see the tomcat-test.ear - in the <a href="/zip_archives/contrib-cvs.zip">contrib/tomcat</a> module - - - -<jsp:include page="navigation.jsp" flush="true" /> \ No newline at end of file +<jsp:include page="head.jsp" flush="true" /> +<jsp:include page="slogan.jsp" flush="true" > + <jsp:param name="SLOGAN" value="JBoss/Tomcat/Apache"/> +</jsp:include> + + + <p class="head">STOP! USE THE BUNDLE + + <p class="text">This howto is now obsolete. If you want to run JBoss with an embeded + servlet container use the JBoss/Tomcat or JBoss/Jetty bundle which comes preconfigured + to work with zero post-install configuration. + + + <p class="head">A FULL J2EE STACK + + + <p class="text"><img height="71" width="100" src="pictures/tomcat_3.gif" align="left">The + JBoss organization wants to deliver a complete J2EE based product to the market. + The JBoss organization decided to integrate the Tomcat engine stack with a running + version of JBoss in a single VM. Now you can serve all your servlet and JSP needs + with 2 simple downloads and a couple of configuration files. Check out the + Tomcat <a href="http://jakarta.apache.org" target="_top">homepage</a> for + information related to Tomcat. + <p>The goal of this page is to explain how to make JBoss automatically start Tomcat, + so that it runs in the same VM.</p> + <p>We now run optimized stacks the JSP/Servlet engine talks natively with + the EJB engine resulting in dramatic speed increases. Without the optimization + the invocation is through the network layer. With the optimized layers the + invocation is native, inVM, within the same stack of APIs + + + <p class="head">FEATURES + + + <p class="text"> + <ul> + <li>Parsing of server.xml for full Tomcat configuration support + <li>Support for Tomcat 3.2 and up + <li>Coming support for Catalina + <li>Full j2ee integration in JMX + <li>single startup/shutdown script + <li>Separated stacks inVM + <li>Integrated stacks inVM + <li>J2EE deployer for JBoss/Tomcat + <li>Full EAR support + <li>JBoss Auto-Deploy for EAR + <li>JNDI shared visibility + <li>Integrated Security Model + </ul> + + + + <p class="head">MAILING LISTS + + + <p class="text">Refer to Tomcat's <a href="http://jakarta.apache.org" target="_top">homepage</a> for questions specific to Tomcat deployment. + +<p>Questions about the J2EE deployer and the integration should be posted + to <a href="lists.jsp">our lists</a> (jboss) +<p class="head">DISTRIBUTION AND CVS + + + <p class="text"> + +<p> JBoss Tomcat is shipped as part of the <a href="binary.jsp">standard JBoss/Server + package</a>. However, the current distribution is based on an earlier version + of EmbeddedTomcat that does not parse Tomcat's server.xml. If you don't need + server.xml parsed (ie, you're not trying to integrate with Apache), then the + current version may be the easiest route for you. </p> + <p> + The Pre-2.1 CVS source contains a new version of EmbeddedTomcat + (plus other enhancements) that does parse Tomcat's server.xml. + It is recommended that you use the information provided below. This + new version of EmbeddedTomcat will be rolled in to the official 2.1 + release. + <br> + </p> + + + + <p class="head">HOWTO EMBEDDEDTOMCAT + + + <p class="text">You will need + <ul> + <li><a href="/zip_archives/">JBoss Pre-2.1 Src</a> + <li><a href="http://jakarta.apache.org/builds/jakarta-tomcat/release/v3.2.1/bin/">Tomcat Version 3.2</a> + </ul> + <p>You can get the latest CVS version of JBoss Pre-2.1 from + <a href="/zip_archives/">here</a>. Grab both jboss-cvs.zip and + contrib-cvs.zip to build JBoss and EmbeddedTomcat. + </p> + <p>You can get the latest release of tomcat from the jakarta website. NOTE: This has been tested with tomcat 3.2.1 However it won't run on tomcat 3.1, and tomcat 3.3 is not suppported yet.</p> + + <ol> + <li><strong>Build JBoss from src</strong> <br> + Build JBoss from the CVS sources. This is generally accomplished + by changing to the src/build directory and executing build.sh (or + build.bat on NT). The build creates a dist directory under the + src root. This dist directory will be referred to as the JBOSS_HOME + for the EmbeddedTomcat build. + <br> + <br> + <li><strong>Build EmbeddedTomcat(optional)</strong> <br> + Build the EmbeddedTomcat service from the contrib CVS sources + if you want. This is optional as the current JBoss cvs src + includes a prebuilt version of the tomcat-service.jar. + To build the EmbeddedTomcat service, change to the + contrib/tomcat/src/build directory and execute build.sh + (or build.bat on NT). NOTE: You need to define environment + values for JBOSS_HOME and TOMCAT_HOME to fit your + environment. JBOSS_HOME needs to point to the dist directory of + the JBoss build step and TOMCAT_HOME is the dist directory of the + jakarta-tomcat-3.2.x release. + <br> + <br> + Once this build completes, execute <i>build.sh client</i>. + This will create a new tomcat-test.ear. + <br> + <br> + Once you've built EmbeddedTomcat, + copy contrib/tomcat/tomcat-service.jar to $JBOSS_HOME/lib/ext. Finally, + copy contrib/tomcat/tomcat-test.ear to $JBOSS_HOME/deploy. + <br> + <br> + <li><strong>Add the tomcat libs to the server classpath</strong> <br> + In JBOSS_HOME/conf/default/ edit jboss.conf file to uncomment the + ClassPathExtension mbean for the tomcat lib directory to:<br> + <pre> +<!--Uncomment to add Tomcat classes to classpath --> +<MLET CODE = "org.jboss.util.ClassPathExtension" ARCHIVE="jboss.jar" CODEBASE="../../lib/ext/"> + <ARG TYPE="java.lang.String" VALUE="TOMCAT_HOME/lib/"> + <ARG TYPE="java.lang.String" VALUE="Tomcat"> +</MLET> +</pre> + where TOMCAT_HOME value must be set to the full path described above in + the build of the EmbeddedTomcat service. Note that there must be + a trailing slash(/) in order for the jars in the lib directory to + be added to the classpath. + + <li><strong>Edit jboss.jcml</strong><br> + In JBOSS_HOME/conf/default/ edit the jboss.jcml file to uncomment + the EmbeddedTomcatService mbean. Locate: + <pre> + <!-- + Uncomment to add embedded tomcat service + <mbean code="org.jboss.tomcat.EmbeddedTomcatService" name="DefaultDomain:service=EmbeddedTomcat" /> + --> +</pre> + and uncomment the mbean line so it reads as follows: + <pre> + <!-- + Uncomment to add embedded tomcat service + --> + <mbean code="org.jboss.tomcat.EmbeddedTomcatService" name="DefaultDomain:service=EmbeddedTomcat" /> +</pre> + <p> Further down in the jboss.jcml file, make + sure your J2eeDeployer is set as: </p> + <pre> + <mbean code="org.jboss.deployment.J2eeDeployer" name="J2EE:service=J2eeDeployer"> + <attribute name="DeployerName">Default</attribute> + <attribute name="JarDeployerName">:service=ContainerFactory</attribute> + <attribute name="WarDeployerName">:service=EmbeddedTomcat</attribute> + <mbean> +</pre> + <li><strong>Edit Tomcat's server.xml</strong> <br> + Add the following lines to server.xml in TOMCAT_HOME/conf/ + <pre> +<!-- JBoss, Setup the class loader heirarchy to enable in VM call optimization. + Add after the org.apache.tomcat.context.WorkDirInterceptor ContextInterceptor +--> + <ContextInterceptor className="org.jboss.tomcat.ContextClassLoaderInterceptor" /> +<!-- JBoss, Add the jboss-web.xml parser. Add after the org.jboss.tomcat.ContextClassLoaderInterceptor + ContextInterceptor +--> + <ContextInterceptor className="org.jboss.tomcat.naming.JbossWebXmlReader" /> +<!-- JBoss, Set the request thread classloader. Add before the org.apache.tomcat.request.SessionInterceptor + RequestInterceptor +--> + <RequestInterceptor className="org.apache.tomcat.request.Jdk12Interceptor" /> +<!-- JBoss, Map the current web user to the SecurityAssociation principal. Add + after the org.apache.tomcat.request.SimpleRealm RequestInterceptor +--> + <RequestInterceptor className="org.jboss.tomcat.security.JbossRealm" /> +</pre> + <li><strong>Adding javac to the server classpath</strong> <br> + If you are going to be using JSP files with tomcat, you + need to add the JDK lib/tools.jar file to the classpath to + pickup the javac compiler. You can do this by either + setting your CLASSPATH env variable, by editing run.sh/run.bat + to add tools.jar to CLASSPATH, or by copying tools.jar to + the TOMCAT_HOME/lib directory. + <li><strong>Start JBoss</strong> <br> + If you start JBoss now by typing <code>run.sh</code> + (or <code>run.bat</code> for Windows) you should + see the following Tomcat related output in your + log messages: + <pre> +Using configuration "default" +[Info] Java version: 1.3.0_01,Sun Microsystems Inc. +[Info] Java VM: Java HotSpot(TM) Server VM 1.3.0_01,Sun Microsystems Inc. +[Info] System: Linux 2.2.16-22,i386 + ... +[EmbeddedTomcat] Starting +[EmbeddedTomcat] Starting EmbeddedTomcat.... +2001-02-20 05:01:23 - ContextManager: Adding context Ctx( /examples ) +2001-02-20 05:01:23 - ContextManager: Adding context Ctx( /admin ) +[EmbeddedTomcat] Starting tomcat. Check logs/tomcat.log for error messages +2001-02-20 05:01:23 - ContextManager: Adding context Ctx( ) +2001-02-20 05:01:23 - ContextManager: Adding context Ctx( /test ) +2001-02-20 05:01:25 - PoolTcpConnector: Starting HttpConnectionHandler on 8080 +2001-02-20 05:01:25 - PoolTcpConnector: Starting Ajp12ConnectionHandler on 8007 +[EmbeddedTomcat] OK +[EmbeddedTomcat] Started + ... +[Default] JBoss PRE-2.1 Started in 0m:14s +</pre> + <p>That's it !! Note that the connection handlers + are configured from Tomcat's server.xml file. + </ol> + + + </table> + + + + <p class="head">HOWTO PACKAGE AND DEPLOY AN EAR ON JBOSS/TOMCAT + + + <p class="text">In order to benefit from the classloader integration, you have to deploy your application in an EAR file as recommended by the <a href="http://java.sun.com/j2ee/download.html#platformspec">J2EE specification</a>. + + <p class="text">In case you don't want to read all the J2EE spec, here is a brief summary of what you have to do:</p> + <ol> + + <li>Write your beans and package them in an ejb-jar file. You don't have to + do anything special here. See the <a href="doco_files/jaws.dtd">manual</a> + for details on how to package beans for JBoss.<br> + + <li>Write your servlets/JSPs and package them in a war file.<br> + Add a Class-Path attribute to your war files MANIFEST.MF file to reference + your beans package. for detailed information on that see: <a href="/documentation/HTML/ch11.html">J2eeDeployment + Howto</a>.<br> + Assuming you have a bean deployed under the jndi name "myBean", the calls to this bean from your servlets will look like that: + <pre>MyBeanHome home = (MyBeanHome)new InitialContext().lookup("myBean"); +MyBean bean = home.create();</pre> + <p class="text">Notes:</p> + <ul> + <li>Since JBoss takes care of the classloader stuff, you don't have to include much in the WEB-INF/lib directory: you don't need any of your beans interfaces, and you don't need the old jboss-client.jar, jnp-client.jar... + </ul> + <br> + <li>Package your application in an ear file.<br> + An ear file is a jar archive which contains: + <ul> + <li>Your jar files + <li>Your war files + <li>A deployment descriptor for your application. This file must be named "application.xml", and must be located in the META-INF directory in the ear archive. This file tells JBoss which modules are EJBs, which ones are web modules, and the context paths for the web-modules. Here is a sample application.xml file: + <pre><?xml version="1.0" encoding="ISO-8859-1"?> + +<application> + <display-name>My application</display-name> + + <module> + <web> + <web-uri>webmodule.war</web-uri> + <context-root>/servlets</context-root> + </web> + </module> + + <module> + <ejb>beans.jar</ejb> + </module> + +</application></pre> + <p class="text">See also the <a href="http://java.sun.com/j2ee/dtds/application_1_2.dtd">DTD</a> for application.xml on Javasoft's website.</p> + </ul> + <li>Deploy your ear file.<br> + Option 1: Copy your ear file to JBOSS_HOME/deploy (wow!) + <br> + Option 2: Surf to http://yourhost:8082, and find the + J2eeDeployer service. Give it the URL of your ear file (don't forget the protocol, be it http: or file:), and click on the deploy button.<br> + + <li>That's it!<br> + The server console should show your application being deployed + on Tomcat and JBoss, and your web module should be available + on http://yourhost:8080/servlets (assuming the context-root was "/servlets"). + <p> + Note: Even though JBoss and Tomcat are + cooperating to dynamically deploy your application, Apache must + be configured manually. This means that for your application + to be visible through Apache, you must setup the appropriate + JkMount statements in mod_jk.conf. + </p> + </ol> + <p class="text">For a full example including a servlet and an EJB, see the tomcat-test.ear + in the <a href="/zip_archives/contrib-cvs.zip">contrib/tomcat</a> module + + + +<jsp:include page="navigation.jsp" flush="true" /> _______________________________________________ Jboss-development mailing list [EMAIL PROTECTED] http://lists.sourceforge.net/lists/listinfo/jboss-development
