User: mulder
Date: 00/09/01 18:38:22
Modified: . tomcat.htm
Log:
Update the Tomcat directions to reflect today's exercise. This probably
still needs some brushing up on formatting and stuff, but at least the
content is now correct...
Revision Changes Path
1.2 +190 -138 jbossweb/tomcat.htm
Index: tomcat.htm
===================================================================
RCS file: /products/cvs/ejboss/jbossweb/tomcat.htm,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- tomcat.htm 2000/08/29 23:12:31 1.1
+++ tomcat.htm 2000/09/02 01:38:22 1.2
@@ -3,25 +3,25 @@
<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>
+ <tbody>
<tr height="1958">
-
- <td bgcolor="white" valign="top" height="718">
+
+ <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
+
+ <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>
@@ -29,13 +29,13 @@
<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>
@@ -44,26 +44,26 @@
<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%">
+
+ <td align="right" width="100%">
<table border="0" cellpadding="0" cellspacing="0" width="100%" height="89">
<tbody>
<tr>
-
- <td valign="top" width="648">
+
+ <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, and all in one
VM. Now you can serve all your servlet and JSP needs with 2 simple downloads and
couple of configuration files. You can find the Tomcat engine <a
href="http://jakarta.apache.org">here</a>. <br> 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>
@@ -74,9 +74,9 @@
</tbody>
</table>
</td>
-
+
<td width="21"><img alt="o" height="1" src="binary.htm" width="1"></td>
-
+
<td width="4"></td>
</tr>
</tbody>
@@ -95,28 +95,28 @@
<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%">
+
+ <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> By running Tomcat inside the same VM as jBoss, you will have
an easier to startup/shutdown application server, but over all the goal we are
pursuing is GREATER SPEED! The reason is simple we try to keep all the invocations
inside one VM</p>
- <p>If you have Servlets/JSPs which access some EJBs, you'll
- get dramatically improved performance because the calls will
+ <p>If you have Servlets/JSPs which access some EJBs, you'll
+ get dramatically improved performance because the calls will
be in-VM (no network access).</p>
<p><font face="Myriad Web,Arial"><b><u><em>WARNING</em></u><br>
THIS VERSION IS FOR DEVELOPMENT AND EVALUATION ONLY. Currently
you can run Tomcat in the same VM as jBoss, but the performance will not be as fast as
you would expect from in memory invocations the reason being that we serialize the
method invocations. We are working on an accelarated version, due out soon, that
works with in memory objects, non-serialized. A factor of 30 is expected with this
optimization (class loader integration). Stay tuned for the first beta version, we
appreciate your understanding and patience on this integration work in progress.
</b></font></p>
@@ -127,129 +127,181 @@
</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>
+ <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>
+ <tr>
<td bgcolor="#99cc66" width="11"><img alt="o" height="1" src="binary.htm"
width="1"></td>
- <td bgcolor="#99cc66" width="100%">
+ <td bgcolor="#99cc66" width="100%">
<table border="0" cellpadding="0" cellspacing="0" width="100%">
- <tbody>
- <tr bgcolor="#99cc66">
+ <tbody>
+ <tr bgcolor="#99cc66">
<td width="100%"><font color="white" face="Myriad Web,Arial"
size="3"><b>Requirements</b></font></td>
</tr>
- </tbody>
+ </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">
+ <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%">
+ <td align="right" width="100%">
<table border="0" cellpadding="0" cellspacing="0" width="100%" height="89">
- <tbody>
- <tr>
+ <tbody>
+ <tr>
<td valign="top" width="672"><br>
<p>You need to download both jBoss 2 and Tomcat of course...<br>
- Tomcat's integration has been tested with the <font
size="2"><i>(current
- as of 07/05/2000)</i></font> CVS version of Tomcat, so nothing
+ Tomcat's integration has been tested with the latest beta
+ <font size="2"><i>(3.2b3 as of 09/01/2000)</i></font> of Tomcat, so
nothing
is guaranteed with other versions...</p>
</td>
<td valign="top" width="10"></td>
<td align="right" valign="top" width="11"> </td>
</tr>
- </tbody>
+ </tbody>
</table>
</td>
<td width="21"><img alt="o" height="1" src="binary.htm" width="1"></td>
<td width="4"></td>
</tr>
- </tbody>
+ </tbody>
</table>
<table border="0" cellpadding="0" cellspacing="0" width="100%">
- <tbody>
- <tr>
+ <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>
+ <tr>
<td bgcolor="#99cc66" width="11"><img alt="o" height="1" src="binary.htm"
width="1"></td>
- <td bgcolor="#99cc66" width="100%">
+ <td bgcolor="#99cc66" width="100%">
<table border="0" cellpadding="0" cellspacing="0" width="100%">
- <tbody>
- <tr bgcolor="#99cc66">
+ <tbody>
+ <tr bgcolor="#99cc66">
<td width="100%"><font color="white" face="Myriad Web,Arial"
size="3"><b>How-To</b></font></td>
</tr>
- </tbody>
+ </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">
+ <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%">
+ <td align="right" width="100%">
<table border="0" cellpadding="0" cellspacing="0" width="100%" height="89">
- <tbody>
- <tr>
- <td valign="top" width="672">
+ <tbody>
+ <tr>
+ <td valign="top" width="672">
<p><br>
- First you should set a couple of environment variables:</p>
- <ul>
- <li>TOMCAT_HOME must point to the base directory of Tomcat's
- binaries. Typically, if you built Tomcat from
jakarta/jakarta-tomcat,
- TOMCAT_HOME should point to jakarta/build/tomcat.</li>
- <li>SERVLETAPI_HOME must point to the source directory
"jakarta-servletapi".
- The file $SERVLETAPI_HOME/lib/servlet.jar will be required.
+ <ol>
+ <li>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
point to <B>jaxp.jar</B> and
+ <B>parser.jar</B> from the JAXP 1.0.1 distribution, and
+ <I>nothing else</I> (unless you really know what you're
+ doing!)</td></tr>
+ </table>
</li>
- <li> Your CLASSPATH must contain $JAVA_HOME/lib/tools.jar
- since Tomcat needs this to compile JSPs.</li>
- </ul>
- <p>Then you should add these two lines at the end of the file
- jboss.conf:</p>
- <p><mlet code = "org.jboss.tomcat.TomcatService" archive="jboss.jar"
codebase="../lib/ext/">
- </mlet><mlet code = "org.jboss.tomcat.TomcatService" archive="jboss.jar"
codebase="../lib/ext/">
- </mlet><mlet code = "org.jboss.tomcat.TomcatService" archive="jboss.jar"
codebase="../lib/ext/">
- </mlet><mlet code = "org.jboss.tomcat.TomcatService" archive="jboss.jar"
codebase="../lib/ext/">
- </mlet><mlet code = "org.jboss.tomcat.TomcatService" archive="jboss.jar"
codebase="../lib/ext/">
- </mlet> <mlet code = "org.jboss.tomcat.TomcatService" archive="jboss.jar"
codebase="../lib/ext/">
- </mlet><font face="Courier New, Courier, mono" size="2"><MLET
- CODE = "org.jboss.tomcat.TomcatService"
ARCHIVE="jboss.jar"
- CODEBASE="../lib/ext/"><br>
- </MLET></font></p>
- <p>That's it !! You just have to launch jBoss now and you will
- have an EJB/JSPs/Servlets server running in one VM... </p>
+ <li>Edit the Tomcat configuration file server.xml. It is located
+ in the conf directory under your base Tomcat directory
+ (jakarta-tomcat for the binary). There are a number of lines
+ that deal with RequestInterceptors, the last of which are currently
+ the Realms (SimpleRealm, JDBCRealm, etc.). <B>After</B> the other
+ RequestInterceptors, add the following:
+<pre>
+ <RequestInterceptor
+ className="org.apache.tomcat.request.Jdk12Interceptor"
+ debug="0" />
+</pre>
+ </li>
+ <li>Edit the jBoss configuration file jboss.conf. 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 Tomcat support. Be sure to set your 'TOMCAT_HOME'
+ -- environment variable before starting JBoss.
+ -- MLET CODE = "org.jboss.tomcat.TomcatService" ARCHIVE="jboss.jar"
CODEBASE="../lib/ext/">
+ -- /MLET>
+ -->
+</pre>
+ You need to uncomment these lines so they read as follows (note
+ you must add the < signs at the beginning of the two
relevant
+ lines!):
+<pre>
+<!--
+ -- Comment this to remove Tomcat support. Be sure to set your 'TOMCAT_HOME'
+ -- environment variable before starting JBoss.
+ -->
+ <MLET CODE = "org.jboss.tomcat.TomcatService" ARCHIVE="jboss.jar"
CODEBASE="../lib/ext/">
+ </MLET>
+</pre></li>
+ <li>Put your EJB's <I>Home and Remote Interfaces</I> in the
+ <b>WEB-INF/classes</b> directory under your Tomcat web app directory
+ (for example, jakarta-tomcat/webapps/myapp/WEB-INF/classes).</li>
+ <li>Put the jBoss client files <i>jboss-client.jar</i>,
<i>jnp-client.jar</i>,
+ <i>jta-spec1_0_1.jar</i>, and (for 1.2.2 but not 1.3) <i>jndi.jar</i>
in the
+ <b>WEB-INF/lib</b> directory under your Tomcat web app directory
+ (for example, jakarta-tomcat/webapps/myapp/WEB-INF/lib). These
+ files can be found in the <B>client</B> directory under your jBoss
+ binary install (or <b>dist/client</b> for source builds).</li>
+ <li>Put the JNDI configuration file <i>jndi.properties</i> in the
+ <b>WEB-INF/classes</b> directory under your Tomcat web app directory
+ (for example, jakarta-tomcat/webapps/myapp/WEB-INF/classes).
+ This file can be found in the <b>conf</b> directory under you jBoss
+ binary install (or <b>dist/conf</b> for source builds).</li>
+ <li>If you later want to move jBoss and Tomcat to separate
+ machines, you will need to change the hostname in jndi.properties
+ and alter jboss.properties in the jBoss server configuration.</li>
+ </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>
+ </tbody>
</table>
</td>
<td width="21"><img alt="o" height="1" src="binary.htm" width="1"></td>
<td width="4"></td>
</tr>
- </tbody>
+ </tbody>
</table>
</td>
-
- <td bgcolor="white" valign="top" width="170" height="718">
+
+ <td bgcolor="white" valign="top" width="170" height="718">
<table border="0" cellpadding="0" cellspacing="0" width="100%">
<tbody>
<tr>
@@ -263,21 +315,21 @@
<table border="0" cellpadding="0" cellspacing="0" width="100%">
<tbody>
<tr height="20">
-
- <td bgcolor="#FFFFFF">
+
+ <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
+
+ <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">
+
+ <td bgcolor="#99cc66" width="100%" height="145">
<table border="0" cellpadding="2" cellspacing="0" width="100%">
<tbody>
<tr>
@@ -285,10 +337,10 @@
<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.
+ <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>
@@ -299,40 +351,40 @@
</tbody>
</table>
</td>
-
+
<td bgcolor="#99cc66" height="145"></td>
</tr>
</tbody>
</table>
-
+
<table border="0" cellpadding="0" cellspacing="0" width="100%">
- <tbody>
+ <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>
+
+ <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">
+
+ <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
+
+ <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">
+
+ <td bgcolor="#99cc66" width="100%" height="195">
<table border="0" cellpadding="2" cellspacing="0" width="100%">
<tbody>
<tr>
@@ -340,8 +392,8 @@
<table border="0"
cellpadding="2" cellspacing="0" width="100%">
<tbody>
<tr
height="249">
-
- <td height="209">The invocation of EJBs by Tomcat's
+
+ <td height="209">The invocation of EJBs by Tomcat's
servlets or JSPs goes through serialization. We are
working on a non-serializing version that will significantly speed up the integrated
invocations. Some integration of classloaders needs to be worked out. <b> This
version is for development evaluation only</b> Do not use this version to produce
benchmarks of Tomcat/jboss, an optimized version will come out soon.
</td>
</tr>
@@ -352,69 +404,69 @@
</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>
+ <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">
+ <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>
+ </tbody>
</table>
<table border="0" cellpadding="0" cellspacing="0" width="100%">
- <tbody>
- <tr>
- <td bgcolor="#FFFFFF">
+ <tbody>
+ <tr>
+ <td bgcolor="#FFFFFF">
<div align="right"> <img src="picture/corner-w.gif" width="10"
height="22"></div>
</td>
- <td bgcolor="#336600" width="100%" nowrap><font
face="Arial,Helvetica,sans-serif" color="white" size="3"><b>Have
+ <td bgcolor="#336600" width="100%" nowrap><font
face="Arial,Helvetica,sans-serif" color="white" size="3"><b>Have
a look at... </b></font></td>
<td bgcolor="#396c06"><img alt="o" height="1" src="picture/blank.gif"
width="1"></td>
</tr>
- <tr height="253">
+ <tr height="253">
<td></td>
- <td bgcolor="#ffcc00" width="100%">
+ <td bgcolor="#ffcc00" width="100%">
<table border="0" cellpadding="2" cellspacing="0" width="100%">
- <tbody>
- <tr>
- <td>
+ <tbody>
+ <tr>
+ <td>
<table border="0" cellpadding="2" cellspacing="0" width="100%">
- <tr height="21">
- <td width="67" height="21"><a href="mailing.htm"
target="mainFrame"><font face="Myriad Web,Arial" size="3" color="black">Mailing
+ <tr height="21">
+ <td width="67" height="21"><a href="mailing.htm"
target="mainFrame"><font face="Myriad Web,Arial" size="3" color="black">Mailing
lists </font></a></td>
</tr>
- <tr>
+ <tr>
<td width="67"><a href="cvs.htm" target="mainFrame"><font
face="Myriad Web,Arial" size="3" color="black">CVS</font></a></td>
</tr>
- <tr>
+ <tr>
<td width="67"><a href="binary.htm" target="mainFrame"><font
face="Myriad Web,Arial" size="3" color="black">Binary</font></a></td>
</tr>
- <tbody> </tbody>
+ <tbody> </tbody>
</table>
</td>
</tr>
- </tbody>
+ </tbody>
</table>
</td>
<td bgcolor="#99cc66"></td>
</tr>
- </tbody>
+ </tbody>
</table>
</td>
-
+
<td bgcolor="#bfbffe" height="718"></td>
</tr>
</table>