User: dewayne
Date: 01/02/18 18:01:10
Modified: documentation tomcat.htm
Log:
Added meta-refresh tag so the browser would be bounced to the
new JBoss+Tomcat docos.
Revision Changes Path
1.4 +10 -535 newsite/documentation/tomcat.htm
Index: tomcat.htm
===================================================================
RCS file: /products/cvs/ejboss/newsite/documentation/tomcat.htm,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -r1.3 -r1.4
--- tomcat.htm 2001/01/19 10:12:45 1.3
+++ tomcat.htm 2001/02/19 02:01:10 1.4
@@ -1,538 +1,13 @@
-<html>
-
- <head>
- <meta http-equiv="content-type" content="text/html;charset=iso-8859-1">
- <meta name="generator" content="Adobe GoLive 4">
-
- <title>JBoss - Coding the Future</title>
- </head>
-
- <body bgcolor="white" leftmargin="0" topmargin="0" marginwidth="0"
marginheight="0">
-
- <table border="0" cellpadding="0" cellspacing="0" width="100%" height="581">
- <tbody>
- <tr height="1958">
-
- <td bgcolor="white" valign="top" height="718">
- <table border="0" cellpadding="0" cellspacing="0" width="100%" height="51">
- <tbody>
- <tr height="2">
- <td height="2"><img src="picture/corner-nw-small.gif" width="11"
height="11"></td>
- </tr>
- <tr height="37">
-
- <td height="37"><img alt="o" height="1" src="binary.htm" width="1"><font
color="#ffcc00" face="Arial,Helvetica,sans-serif" size="6"><b>Running
- Tomcat with JBoss</b></font></td>
- </tr>
- </tbody>
- </table>
- <table border="0" cellpadding="0" cellspacing="0" width="100%">
- <tbody>
- <tr height="2">
-
- <td bgcolor="white" valign="bottom" width="11"><img
src="picture/corner-sw-small.gif" width="11" height="11"></td>
-
- <td bgcolor="white" width="100%"></td>
-
- <td bgcolor="white" width="21"></td>
-
- <td width="4"></td>
- </tr>
- <tr>
- <td bgcolor="#99cc66" width="11"><img alt="o" height="1" src="binary.htm"
width="1"></td>
- <td bgcolor="#99cc66" width="100%">
- <table border="0" cellpadding="0" cellspacing="0" width="100%">
- <tbody>
- <tr bgcolor="#99cc66">
-
- <td width="100%"><font color="white" face="Myriad Web,Arial"
size="3"><b>Goal</b></font></td>
- </tr>
- </tbody>
- </table>
- </td>
-
- <td bgcolor="#FFFFFF" width="21"><img src="picture/corner-e.gif" width="22"
height="22"></td>
- <td width="4"></td>
- </tr>
- <tr height="99">
-
- <td bgcolor="white" valign="top" width="11"><img
src="picture/corner-nw-small.gif" width="11" height="11"></td>
-
- <td align="right" width="100%">
- <table border="0" cellpadding="0" cellspacing="0" width="100%" height="89">
- <tbody>
- <tr>
-
- <td valign="top" width="648">
- <p> </p>
- <p>As part of project Game Over, 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> </p>
- </td>
- <td valign="top" width="10"></td>
- <td align="right" valign="top" width="10"> </td>
- </tr>
- </tbody>
- </table>
- </td>
-
- <td width="21"><img alt="o" height="1" src="binary.htm" width="1"></td>
-
- <td width="4"></td>
- </tr>
- </tbody>
- </table>
- <table border="0" cellpadding="0" cellspacing="0" width="100%">
- <tbody>
- <tr>
- <td bgcolor="white" valign="bottom" width="11"><img
src="picture/corner-sw-small.gif" width="11" height="11"></td>
- <td bgcolor="white" width="100%"></td>
- <td bgcolor="white" width="21"></td>
- <td width="4"></td>
- </tr>
- <tr>
- <td bgcolor="#99cc66" width="11"><img alt="o" height="1" src="binary.htm"
width="1"></td>
- <td bgcolor="#99cc66" width="100%">
- <table border="0" cellpadding="0" cellspacing="0" width="100%">
- <tbody>
- <tr bgcolor="#99cc66">
-
- <td width="100%"><font color="white" face="Myriad Web,Arial"
size="3"><b>Benefits</b></font></td>
- </tr>
- </tbody>
- </table>
- </td>
-
- <td bgcolor="#FFFFFF" width="21"><img src="picture/corner-e.gif" width="22"
height="22"></td>
- <td width="4"></td>
- </tr>
- <tr height="56">
-
- <td bgcolor="white" valign="top" width="11"><img
src="picture/corner-nw-small.gif" width="11" height="11"></td>
-
- <td align="right" width="100%">
- <table border="0" cellpadding="0" cellspacing="0" width="100%" height="89">
- <tbody>
- <tr>
- <td valign="top" width="672"><br>
- <p>One benefit of running Tomcat inside the same VM as JBoss is to
have an easier to manage application server. The main goal, however, is greater
performance. By eliminating unnecessary network calls and keeping all the
invocations inside one VM the performance is significantly enhanced.</p>
- <p>If you have Servlets/JSPs which access some EJBs, you'll
- get dramatically improved performance because the calls will
- be intra-VM (no network access).</p>
- <p><font face="Myriad Web,Arial"><b><u><em>WARNING</em></u><br>
- THIS IS STILL A BETA VERSION. </b></font></p>
- </td>
- <td valign="top" width="10"></td>
- <td align="right" valign="top" width="11"> </td>
- </tr>
- </tbody>
- </table>
- </td>
-
- <td width="21"><img alt="o" height="1" src="binary.htm" width="1"></td>
-
- <td width="4"></td>
- </tr>
- </tbody>
- </table>
-
- <table border="0" cellpadding="0" cellspacing="0" width="100%">
- <tbody>
- <tr>
- <td bgcolor="white" valign="bottom" width="11"><img
src="picture/corner-sw-small.gif" width="11" height="11"></td>
- <td bgcolor="white" width="100%"></td>
- <td bgcolor="white" width="21"></td>
- <td width="4"></td>
- </tr>
- <tr>
- <td bgcolor="#99cc66" width="11"><img alt="o" height="1" src="binary.htm"
width="1"></td>
- <td bgcolor="#99cc66" width="100%">
- <table border="0" cellpadding="0" cellspacing="0" width="100%">
- <tbody>
- <tr bgcolor="#99cc66">
- <td width="100%"><font color="white" face="Myriad Web,Arial"
size="3"><b>Requirements</b></font></td>
- </tr>
- </tbody>
- </table>
- </td>
- <td bgcolor="#FFFFFF" width="21"><img src="picture/corner-e.gif" width="22"
height="22"></td>
- <td width="4"></td>
- </tr>
- <tr height="56">
- <td bgcolor="white" valign="top" width="11"><img
src="picture/corner-nw-small.gif" width="11" height="11"></td>
- <td align="right" width="100%">
- <table border="0" cellpadding="0" cellspacing="0" width="100%" height="89">
- <tbody>
- <tr>
- <td valign="top" width="672"><br>
- <ul>
- <li>JBoss 2.0. BETA-PROD 03</li>
- <li>Tomcat Version 3.2b4. You can get the latest release of
tomcat from the <a href="http://jakarta.apache.org/builds/tomcat/release/">jakarta
website</a>.<br>
-<p><strong>NOTE:</strong> This has been tested with tomcat up to 3.2b6, and should
work with the forthcoming final 3.2 version. However it won't run on tomcat 3.1, and
tomcat 3.3 is not suppported yet.</li>
- </td>
- <td valign="top" width="10"></td>
- <td align="right" valign="top" width="11"> </td>
- </tr>
- </tbody>
- </table>
- </td>
- <td width="21"><img alt="o" height="1" src="binary.htm" width="1"></td>
- <td width="4"></td>
- </tr>
- </tbody>
- </table>
- <table border="0" cellpadding="0" cellspacing="0" width="100%">
- <tbody>
- <tr>
- <td bgcolor="white" valign="bottom" width="11"><img
src="picture/corner-sw-small.gif" width="11" height="11"></td>
- <td bgcolor="white" width="100%"></td>
- <td bgcolor="white" width="21"></td>
- <td width="4"></td>
- </tr>
- <tr>
- <td bgcolor="#99cc66" width="11"><img alt="o" height="1" src="binary.htm"
width="1"></td>
- <td bgcolor="#99cc66" width="100%">
- <table border="0" cellpadding="0" cellspacing="0" width="100%">
- <tbody>
- <tr bgcolor="#99cc66">
- <td width="100%"><font color="white" face="Myriad Web,Arial"
size="3"><b>How-to setup jboss for tomcat</b></font></td>
- </tr>
- </tbody>
- </table>
- </td>
- <td bgcolor="#FFFFFF" width="21"><img src="picture/corner-e.gif" width="22"
height="22"></td>
- <td width="4"></td>
- </tr>
- <tr height="56">
- <td bgcolor="white" valign="top" width="11"><img
src="picture/corner-nw-small.gif" width="11" height="11"></td>
- <td align="right" width="100%">
- <table border="0" cellpadding="0" cellspacing="0" width="100%" height="89">
- <tbody>
- <tr>
- <td valign="top" width="672">
- <p><br>
- <ol>
- <li><strong>Setup environment variables.</strong>In whatever batch
or shell script you use to launch JBoss and
- Tomcat, add entries for the following environment variables:
- <table border="1">
- <tr><th>variable</th><th>value</th></tr>
- <tr><td align="RIGHT" valign="TOP">TOMCAT_HOME</td><td>The base
directory of Tomcat's
- binaries. With the binary distribution, this would be
- jakarta-tomcat under your installation root.</td></tr>
- <tr><td align="RIGHT" valign="TOP">JAVA_HOME</td><td>The base
directory of your JDK 1.2.2
- or 1.3 installation</td></tr>
- <tr><td align="RIGHT" valign="TOP">CLASSPATH</td><td>This should
- <I>not include anything</I> (unless you really know what
- you're doing!). Both Tomcat and JBoss have startup scripts
- that load the necessary JARs onto the classpath.</td></tr>
- </table>
- </li>
- <li><strong>Edit jboss.conf.</strong> It
- is located in the conf directory under the base of your JBoss
- binary distribution, or the dist/conf directory if you built from
- the JBoss source. There are some commented-out lines near the end
- of the file that deal with Tomcat:
-<pre>
-<!--
- -- Uncomment this to add "Integrated Stack (fast) Tomcat support".
- -- This service allows you to integrate the stack of Tomcat and jboss.
- -- Invocations are not going through network but pass native pointers resulting
in dramatic speed increases.
- -- This service allows the J2EE deployer to add and remove Tomcat contexts
dynamically
- -- through JMX for you and in effect deploy EARs. Note that tomcat's server.xml
file will be partially
- -- processed for context support: you can also use JMX to add contexts.
- -- Use the J2EE deployer to deploy full EARs on this stack
- -- Be sure to set your 'TOMCAT_HOME' environment variable before starting JBoss.
- --
- -- The ARG tags are the config file and the port to run tomcat on. Note: only the
url contexts will be
- -- parsed, (path and docBase attruibutes only) all other configurations are not
yet supported.
- --
- -- MLET CODE = "org.jboss.tomcat.EmbeddedTomcatService" ARCHIVE="jboss.jar"
CODEBASE="../../lib/ext/">
- -- ARG TYPE="java.lang.String" VALUE="full path to tomcat config file">
- -- ARG TYPE="int" VALUE=8080>
- -- /MLET>
-</pre>
- You need to uncomment these lines so they read as follows (note
- you must add the < signs at the beginning of the three
relevant
- lines and the file path must always begin with a '/'):
-<pre>
- <MLET CODE = "org.jboss.tomcat.EmbeddedTomcatService" ARCHIVE="jboss.jar"
CODEBASE="../lib/ext/">
- <ARG TYPE="java.lang.String" VALUE="/yyy/server.xml">
- <ARG TYPE="int" VALUE=8080>
- </MLET>
-</pre></li>
- <li><strong>Start JBoss.</strong> 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>
- ...
-[EmbeddedTomcat] Initializing
-[EmbeddedTomcat] Initialized
-[EmbeddedTomcat] Starting
-[EmbeddedTomcat] Testing if Tomcat is present....
-[EmbeddedTomcat] OK
-[EmbeddedTomcat] ContextManager: Adding context Ctx( )
-[EmbeddedTomcat] path="" :jsp: init
-[EmbeddedTomcat] PoolTcpConnector: Starting HttpConnectionHandler on 8080
-[EmbeddedTomcat] Started
- ...
-</pre>
-<p>
- </ol>
- <p>That's it !! You just have to launch JBoss now and it will start
- Tomcat and you will have an EJB/JSPs/Servlets server running in
- one VM... </p>
- </td>
- <td valign="top" width="10"></td>
- <td align="right" valign="top" width="11"> </td>
- </tr>
- </tbody>
- </table>
- </td>
- <td width="21"><img alt="o" height="1" src="binary.htm" width="1"></td>
- <td width="4"></td>
- </tr>
- </tbody>
- </table>
- <table border="0" cellpadding="0" cellspacing="0" width="100%">
- <tbody>
- <tr>
- <td bgcolor="white" valign="bottom" width="11"><img
src="picture/corner-sw-small.gif" width="11" height="11"></td>
- <td bgcolor="white" width="100%"></td>
- <td bgcolor="white" width="21"></td>
- <td width="4"></td>
- </tr>
- <tr>
- <td bgcolor="#99cc66" width="11"><img alt="o" height="1" src="binary.htm"
width="1"></td>
- <td bgcolor="#99cc66" width="100%">
- <table border="0" cellpadding="0" cellspacing="0" width="100%">
- <tbody>
- <tr bgcolor="#99cc66">
- <td width="100%"><font color="white" face="Myriad Web,Arial"
size="3"><b>How-to build web applications for jboss and tomcat</b></font></td>
- </tr>
- </tbody>
- </table>
- </td>
- <td bgcolor="#FFFFFF" width="21"><img src="picture/corner-e.gif" width="22"
height="22"></td>
- <td width="4"></td>
- </tr>
- <tr height="56">
- <td bgcolor="white" valign="top" width="11"><img
src="picture/corner-nw-small.gif" width="11" height="11"></td>
- <td align="right" width="100%">
- <table border="0" cellpadding="0" cellspacing="0" width="100%" height="89">
- <tbody>
- <tr>
- <td valign="top" width="672">
- <p><br>
- 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>
- <p><b>Tomcat's server.xml file will not be
processed!</b></p>
- <p>The reason is that we want to share the classloader
for your application between tomcat and jboss. Since this classloader
- must be initialized at deployment time, your EJBs
and your servlets/JSPs must be bundled together for jboss to know who talks to whom!
- </p>
- <p>In case you don't want to read all the J2EE spec,
here is a brief summary of what you have to do:<ol>
- <li><b>Write your beans</b> and package them in an
ejb-jar file. You don't have to do anything special here. See the
- <a href="../manual/developing.html">manual</a>
for details on how to package beans for jboss.<br>
- <li><b>Write your servlets/JSPs</b> and package them
in a war file. 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>
- <b>Notes</b>:<ul>
- <li>We don't support lookups in the "java:"
namespace from the servlets yet, but work is in progress.
- <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 any of your beans
interfaces, and you don't need the usual jboss-client.jar, jnp-client.jar...
- </ul><br>
- <li><b>Package your application in an ear file</b>.
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>
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
- <module>
- <ejb>beans.jar</ejb>
- </module>
-
-</application>
-</pre>See also the <a
href="http://java.sun.com/j2ee/dtds/application_1_2.dtd">DTD</a> for application.xml
on Javasoft's website. </ul>
- <li><b>Deploy your ear file</b>. 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! 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").
- </ol>
- </p>
- <p>
- For a full example including a servlet and an EJB,
see the <a href="../zip_archives/contrib-cvs-sources.zip">contrib</a> module
- </p>
-
- </td>
- <td valign="top" width="10"></td>
- <td align="right" valign="top" width="11"> </td>
- </tr>
- </tbody>
- </table>
- </td>
- <td width="21"><img alt="o" height="1" src="binary.htm" width="1"></td>
- <td width="4"></td>
- </tr>
- </tbody>
- </table>
- </td>
-
-
-
-
- <td bgcolor="white" valign="top" width="170" height="718">
- <table border="0" cellpadding="0" cellspacing="0" width="100%">
- <tbody>
- <tr>
- <td> </td>
- </tr>
- <tr>
- <td><img alt="o" height="1" src="binary.htm" width="1"><font
color="#424264" face="Myriad Web,Arial" size="1"> </font></td>
- </tr>
- </tbody>
- </table>
- <table border="0" cellpadding="0" cellspacing="0" width="100%">
- <tbody>
- <tr height="20">
-
- <td bgcolor="#FFFFFF">
- <div align="right"> <img src="picture/corner-w.gif" width="10"
height="22"></div>
- </td>
-
- <td bgcolor="#336600" width="100%" myriad web, arial"><font color="white"
face="Myriad Web,Arial"><b><img alt="o" border="0" height="1" src="binary.htm"
width="1"></b></font><font face="Arial,Helvetica,sans-serif" color="white"><b>Info
- </b></font></td>
-
- <td bgcolor="#396c06"><img alt="o" height="1" src="picture/blank.gif"
width="1"></td>
- </tr>
- <tr height="278">
-
- <td height="145"></td>
-
- <td bgcolor="#99cc66" width="100%" height="145">
- <table border="0" cellpadding="2" cellspacing="0" width="100%">
-
<tbody>
-
<tr>
-
<td>
-
<table border="0" cellpadding="2" cellspacing="0"
width="100%">
-
<tbody>
-
<tr height="249">
-
- <td>
- <p><a href="http://jakarta.apache.org">Tomcat</a> is the
- Reference Implementation of the Servlet and JSP APIs.
- It is part of the Jakarta Apache project.</p>
- <p> </td>
-
</tr>
-
</tbody>
-
</table>
-
</td>
-
</tr>
-
</tbody>
-
</table>
- </td>
-
- <td bgcolor="#99cc66" height="145"></td>
- </tr>
- </tbody>
- </table>
-
- <table border="0" cellpadding="0" cellspacing="0" width="100%">
- <tbody>
- <tr height="18">
-
- <td> </td>
- </tr>
- <tr height="308">
-
- <td><img alt="o" height="1" src="binary.htm" width="1"><font
color="#424264" face="Myriad Web,Arial" size="1">
- </font>
- <table border="0" cellpadding="0" cellspacing="0" width="100%">
-
<tbody>
-
<tr height="20">
-
- <td bgcolor="#FFFFFF">
- <div align="right"> <img src="picture/corner-w.gif" width="10"
height="22"></div>
-
</td>
-
- <td bgcolor="#336600" width="100%"><font color="white" face="Myriad
Web,Arial"><b><img alt="o" border="0" height="1" src="binary.htm"
width="1"></b></font><font face="Arial,Helvetica,sans-serif" color="white"><b>The
- task </b></font></td>
-
- <td bgcolor="#396c06"><img alt="o" height="1"
src="picture/blank.gif" width="1"></td>
-
</tr>
-
<tr height="296">
-
- <td height="195"></td>
-
- <td bgcolor="#99cc66" width="100%" height="195">
- <table border="0" cellpadding="2" cellspacing="0" width="100%">
-
<tbody>
-
<tr>
-
<td>
-
<table border="0"
cellpadding="2" cellspacing="0" width="100%">
-
<tbody>
-
<tr
height="249">
-
- <td height="209"><p>Normal calls from a client to EJBs
go through RMI, which means serialization. The overhead of the RMI layer
- is typically 2-3ms. </p>
- <p>But if Tomcat is launched in the same VM as jboss,
calls from Tomcat's servlets or JSPs don't need to be serialized: they can
- talk to the EJBs faster than any other client!</p></td>
-
</tr>
-
</tbody>
-
</table>
-
</td>
-
</tr>
-
</tbody>
-
</table>
-
</td>
-
- <td bgcolor="#99cc66" height="195"></td>
-
</tr>
-
</tbody>
-
</table>
-
- </td>
- </tr>
- </tbody>
- </table>
-
- <table border="0" cellpadding="0" cellspacing="0" width="100%">
- <tbody>
- <tr>
- <td> </td>
- </tr>
- <tr>
- <td><img alt="o" height="1" src="binary.htm" width="1"><font
color="#424264" face="Myriad Web,Arial" size="1">
- </font></td>
- </tr>
- </tbody>
- </table>
- </td>
- </tr>
- </tbody>
- </table>
- </td>
- <td bgcolor="#99cc66"></td>
- </tr>
- </tbody>
- </table>
- </td>
+<html>
+<head>
+ <title>Apache Tomcat</title>
+ <meta http-equiv="refresh" content="0;URL=jboss-tomcat.html">
+</head>
- <td bgcolor="#bfbffe" height="718"></td>
- </tr>
- </table>
- </body>
+<body bgcolor="#FFFFFF">
+This page has moved to <a href="jboss-tomcat.html">jboss-tomcat.html</a>
- </html>
+</body>
+</html>