tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From lar...@locus.apache.org
Subject cvs commit: jakarta-tomcat/src/doc/uguide/images tomcat.gif
Date Tue, 03 Oct 2000 06:15:50 GMT
larryi      00/10/02 23:15:49

  Modified:    src/doc/uguide Tag: tomcat_32 tomcat_ug.html
  Added:       src/doc  Tag: tomcat_32 tomcat-apache-howto.html
               src/doc/uguide/images Tag: tomcat_32 tomcat.gif
  Log:
  Added  tomcat-apache-howto.html submitted by Rob Slifka.
  There were some changes  to account for differences in the doc
  directory between tomcat_32 and MAIN branches, as well a few
  other changes.
  
  Updated tomcat_ug.html to provide anchors for links from
  tomcat-apache-howto.html and display tomcat.gif.
  
  Revision  Changes    Path
  No                   revision
  
  
  No                   revision
  
  
  1.2.2.1   +1139 -696 jakarta-tomcat/src/doc/tomcat-apache-howto.html
  
  Index: tomcat-apache-howto.html
  ===================================================================
  RCS file: /home/cvs/jakarta-tomcat/src/doc/tomcat-apache-howto.html,v
  retrieving revision 1.2
  retrieving revision 1.2.2.1
  diff -u -r1.2 -r1.2.2.1
  --- tomcat-apache-howto.html	2000/08/17 21:22:44	1.2
  +++ tomcat-apache-howto.html	2000/10/03 06:15:47	1.2.2.1
  @@ -1,9 +1,9 @@
   <html>
     <head>
  -    <!-- $Id: tomcat-apache-howto.html,v 1.2 2000/08/17 21:22:44 alex Exp $ -->
  +    <!-- $Id: tomcat-apache-howto.html,v 1.2.2.1 2000/10/03 06:15:47 larryi Exp $ -->
       <!-- Copyright 1999, Apache Software Foundation -->
       <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
  -    <link rel="stylesheet" href="style.css">
  +    <link rel="stylesheet" href="uguide/style.css">
       <title>Tomcat-Apache HOWTO</title>
     </head>
     <body link="#0000ff" vlink="#800080">
  @@ -13,14 +13,15 @@
           <td width="50%">
             <p align="left">
               <a href="http://jakarta.apache.org/index.html">
  -              <img src="images/banner.gif"
  +              <img src="uguide/images/banner.gif"
                      width="350" 
                      height="100" 
                      alt="The Jakarta Project" 
  -                   border="0"></a>
  +                   border="0">
  +            </a>
           </td>
           <td width="50%">
  -          <p align="right"><img border="0" src="images/tomcat.gif" width="100" height="71" alt="The mighty Tomcat - Meow!"></p>
  +          <p align="right"><img border="0" src="uguide/images/tomcat.gif" width="100" height="71" alt="The mighty Tomcat - Meow!"></p>
           </td>
         </tr>
       </table>
  @@ -33,457 +34,732 @@
         has been split off for organizational reasons.  It should be
         considered a <b>work in progress</b>.  Since the Tomcat source
         tree is constantly changing, the information herein may be out
  -      of date.  The only definitive reference at this point is the <a
  +      of date. The only definitive reference at this point is the <a
         href="http://jakarta.apache.org/downloads/sourceindex.html">source
         code</a>.</p>
   
  +    <p>
   	<p>
   	Other important documents: <ul>
  -<li><a href="tomcat-ug.html">Tomcat User's Guide</a></li>
  -<li><a href="mod_jk-howto.html">mod_jk HOWTO</a> [??? should be rolled into tomcat-apache howto]</li>
  +<li><a href="uguide/tomcat_ug.html">Tomcat User's Guide</a></li>
   <li><a href="http://jakarta.apache.org/faq/faqindex.html">Tomcat FAQ</a></li>
  +<li><a href="mod_jk-howto.html">mod_jk HOWTO</a></li>
   </ul>
  -
  -<p>
  -Other Tomcat-Apache HOWTOs: [should be integrated into this one?] <ul>
  -<li><a href="http://satori.com/~avm/tomcat.html">Howto Configure Tomcat 3.1 with Apache</a> by Freddie Mendoza
  -</li>
  -<li><a href="http://www.ccl.net/cca/software/UNIX/apache/index.shtml">Apache Web Server / JServ / Tomcat / SSL Installation on UNIX</a> by Jan K. Labanowski
  -</li>
  -<li><a href="http://www.oop-reserch.com/tomcat_3_1/">Tomcat and JServ</a> by Jun Inamori
  -</li>
  -<li><a href="http://www.dmz.hitachi-sk.co.jp/Java/Tech/servlet/tomcat.html">http://www.dmz.hitachi-sk.co.jp/Java/Tech/servlet/tomcat.html</a> in Japanese
  -</li>
  -</ul>
  -</p>
  -
       <h3>Table of Contents</h3>
       <ul>
  -    [write me]
  +      <li><a href="#intro">Introduction</a><br>
  +        &nbsp;&nbsp;&nbsp; <a href="#cooperation_need">Need for cooperation</a><br>
  +        &nbsp;&nbsp;&nbsp; <a href="#work_together">How will they work together?</a><br>
  +        &nbsp;&nbsp;&nbsp; <a href="#pull_off">What's required to pull this off?</a><br>
  +        &nbsp;</li>
  +      <li><a href="#running_examples">Running Examples</a><br>
  +        &nbsp;
  +      </li>
  +      <li><a href="#configuring_tomcat">Configuring Tomcat</a><br>
  +        &nbsp;&nbsp;&nbsp; <a href="#configuring_contexts">Setting up the
  +        Contexts<br>
  +        </a>&nbsp;&nbsp;&nbsp; <a href="#configuring_works">Making sure it all works
  +        </a><br>
  +        &nbsp;&nbsp;&nbsp; <a href="#configuring_connector">The AJP Connector<br>
  +        </a>&nbsp;
  +      </li>
  +      <li>Configuring Apache
  +        <ul>
  +          <li><a href="#adapter">Web Server Adapter</a><br>
  +            &nbsp;&nbsp;&nbsp; <a href="#adapter_jk_vs_js">mod_jk versus mod_jserv</a><br>
  +            &nbsp;&nbsp;&nbsp; <a href="#adapter_where">Where do I get them?<br>
  +            </a>&nbsp;&nbsp;&nbsp; <a href="#adapter_build">How do I build them?</a><br>
  +            &nbsp;&nbsp;&nbsp; <a href="#adapter_configuration">Configuration implications</a></li>
  +          <li><a href="#httpd">httpd.conf - Apache's main configuration file</a><br>
  +            &nbsp;&nbsp;&nbsp; <a href="#httpd_jk">mod_jk.conf-auto</a><br>
  +            &nbsp;&nbsp;&nbsp; <a href="#httpd_jserv">tomcat-apache.conf</a><br>
  +            &nbsp;</li>
  +        </ul>
  +      </li>
  +      <li><a href="#multiple">Multiple Tomcat JVMs</a><br>
  +            &nbsp;&nbsp;&nbsp; <a href="#multiple_tomcat">Configuring Tomcat</a><br>
  +            &nbsp;&nbsp;&nbsp; <a href="#multiple_apache">Configuring Apache</a><br>
  +        &nbsp;</li>
  +      <li><a href="#virtual_hosting">Virtual Hosting</a><br>
  +            &nbsp;&nbsp;&nbsp; &nbsp;</li>
  +      <li><a href="#common_errors">Common Installation and Configuration
  +        Problems / Questions<br>
  +        </a>&nbsp;&nbsp;&nbsp; <a href="#error_8007">Requesting <b>http://webserver:8007/</b>
  +        produces an HTTP 500 error<br>
  +        </a>&nbsp;&nbsp;&nbsp; <a href="#error_no_apache">Apache won't
  +        start when Tomcat is running</a> / <a href="#error_no_apache">&quot;BindException:
  +        Address already in use&quot;<br>
  +        </a>&nbsp;&nbsp;&nbsp; <a href="#error_ignore_directives">Apache's &lt;Directory&gt;
  +        and &lt;Location&gt; directives seemingly ignored<br>
  +        </a>&nbsp;&nbsp;&nbsp; <a href="#error_no_requests">Tomcat isn't
  +        receiving requests under /servlet</a><br>
  +        &nbsp;&nbsp;&nbsp; <a href="#error_start_nobody">How do I get Tomcat to
  +        start automatically as &quot;nobody&quot;?</a><br>
  +        &nbsp;&nbsp;&nbsp; <a href="#error_same_machine">Can I run both
  +        Apache/JServ and JServ/Tomcat on the same machine?</a><br>
  +        &nbsp;&nbsp;&nbsp; <a href="#error_migrating_jhtml">Migrating from
  +        Apache/JServ JSSI to Apache/Tomcat</a><br>
  +        &nbsp;&nbsp;&nbsp; <a href="#error_jk_where">mod_jk - I want to use it,
  +        but I can't find it.&nbsp; Where is it?</a><br>
  +        &nbsp;&nbsp;&nbsp; <a href="#error_jk_apache_lock">mod_jk - Apache locks
  +        up when requesting a Servlet or JSP</a><br>
  +        &nbsp;&nbsp;&nbsp; <a href="#error_rewrite_usedto">mod_rewrite - Used to
  +        work fine with Apache/JServ, what gives?</a><br>
  +        &nbsp;&nbsp;&nbsp; <a href="#error_ssl_ie">mod_ssl - pages sometimes
  +        don't finish loading using Internet Explorer<br>
  +        </a>&nbsp;&nbsp;&nbsp; <a href="#error_ssl_http">mod_ssl - getScheme()
  +        always returns HTTP!</a><br>
  +        &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<br>
  +        &nbsp;</li>
  +      <li><a href="#credits">Credits</a></li>
       </ul>
   
       <hr size="5">
  -    <h3><a name="apache_tomcat_coop">Apache - Tomcat Cooperation - Sample Server
  -    Integration</a></h3>
  +    <h3><a name="intro">Introduction</a></h3>
   
  -    <p> Up until now we have not discussed Tomcat as a server add on,
  -        instead we have considered it as a <a href="#type_1"> stand-alone</a> container and discussed
  -        how it can be used.&nbsp; There are however a few problems with this
  -        picture:
  -    <ol>
  -      <li> Tomcat is not as fast as Apache when it comes to static pages. </li>
  -      <li> Tomcat is not as configurable as Apache. </li>
  -      <li> Tomcat is not as robust as Apache. </li>
  -      <li> There are many sites with long time investment in certain web servers,
  -    for example, sites that are using CGI scripts/Server API modules/perl/php.&nbsp;
  -        We cannot assume that all of them will want to ditch this legacy. </li>
  -    </ol>
  +    <blockquote>
  +    <h4><a name="cooperation_need">Need for cooperation</a></h4>
   
  -    <p> For all these reasons it is recommended that real world sites
  -        use an industrial strength web server, such as Apache, for serving the static content of 
  -        the site, and use Tomcat as a Servlet/JSP add-on.</p>
  +      <blockquote>
  +        <p>As stated in the Tomcat <a href="uguide/tomcat_ug.html">User's Guide</a>,
  +        Tomcat currently supports <a href="uguide/tomcat_ug.html#container_types">three
  +        modes</a> of execution.&nbsp; While it is entirely possible to have
  +        Tomcat serve both your static and dynamic document provision needs, there
  +        are several reasons why you might&nbsp; not want want to do this.&nbsp;
  +        With respect to the Apache web server,
  +        <p>&nbsp;&nbsp;&nbsp; 1.&nbsp;&nbsp;&nbsp; Tomcat is not as fast as Apache when it comes to static pages.<br>
  +        &nbsp;&nbsp;&nbsp; 2.&nbsp;&nbsp;&nbsp; Tomcat is not as configurable as Apache.<br>
  +        &nbsp;&nbsp;&nbsp; 3.&nbsp;&nbsp;&nbsp; Tomcat is not as robust as Apache.<br>
  +        &nbsp;&nbsp;&nbsp; 4.&nbsp;&nbsp;&nbsp; Tomcat may not address many
  +        sites' need for functionality found only in Apache modules (e.g. Perl,
  +        PHP, etc.).
   
  -    <p> Our agenda:
  -    <ol>
  -      <li> Cover the fundamental behavior of the web server. </li>
  -      <li> Explain what configuration is needed. </li>
  -      <li> Demonstrate this on Apache. </li>
  -    </ol>
  +    <p> For all these reasons it is recommended that real-world sites
  +        use an industrial-strength web server, such as Apache, for serving static content, and use Tomcat as a Servlet/JSP add-on.</p>
  +
  +      </blockquote>
  +    <h4><a name="work_together">How will they work together?</a></h4>
  +
  +      <blockquote>
  +    <p> In a nutshell a web server is waiting for requests.&nbsp; When these requests arrive the server does whatever is needed to 
  +        serve the requests by providing the necessary content.&nbsp; Adding
  +    Tomcat to the mix may somewhat change this behavior.&nbsp; Now the web 
  +        server needs to perform the following:
  +    <ul>
  +      <li> Before the first request can be served, Apache needs to load a web
  +        server adapter (how Tomcat will communicate w/Apache) library and initialize it. </li>
  +      <li> When a request arrives, Apache needs to check and see if it belongs to a servlet, if so it needs to let the adapter
  +           take the request and handle it.</li>
  +    </ul>
   
  +    <p>We'd like Apache to handle our static content, such as
  +    images and html documents, and to forward all requests for
  +    dynamic content to Tomcat.&nbsp; More specifically, we need answers to the following questions:</p>
  +
  +        <blockquote>
  +          <p>1.&nbsp;&nbsp;&nbsp; How will Apache know which request / type of
  +          requests should be forwarded to Tomcat?<br>
  +          2.&nbsp;&nbsp;&nbsp; How will Apache forward these requests to
  +          Tomcat?<br>
  +          3.&nbsp;&nbsp;&nbsp; How will Tomcat accept and handle these requests?</p>
  +        </blockquote>
  +          <p>The majority of our time will be spent dealing with points 1 and 2;
  +          3 should be a snap!</p>
  +      </blockquote>
  +    <h4><a name="pull_off">What's required to pull this off?</a></h4>
  +
  +      <blockquote>
  +        <p>Answers to the above three questions!</p>
  +
  +        <blockquote>
  +          <p>1.&nbsp;&nbsp;&nbsp; Modify Apache's httpd.conf file.<br>
  +          2.&nbsp;&nbsp;&nbsp; Install a web server adapter.<br>
  +          3.&nbsp;&nbsp;&nbsp; Modify Tomcat's <a href="uguide/tomcat_ug.html#server_xml"> server.xml</a> file.</p>
  +
  +        </blockquote>
  +        <p>It is assumed that you are comfortable modifying the configuration of Tomcat
  +        and Apache separately before you've attempted to integrate the
  +        two.&nbsp; As such, we speak in Tomcat/Apache/Servlet lingo, not pausing
  +        to explain what's already been taught in their respective user
  +        guides.&nbsp; Details on Tomcat setup can be found in the <a href="uguide/tomcat_ug.html">Tomcat
  +        User's Guide</a>, while Apache configuration information can be found in
  +        the <a href="http://www.apache.org/docs/">Apache User's Guide</a>.</p>
  +
  +      </blockquote>
  +    </blockquote>
  +
       <hr size="5">
  -    <h3><a name="common_errors">Common Installation and Configuration Problems</a></h3>
  +    
  +
  +        <h3><a name="running_examples">Running Examples</a></h3>
  +
  +    <p>Throughout this document, we'll refer back to these examples,
  +        as these run the gambit of the commonly-desired Apache installs.</p>
  +
       <blockquote>
  -      <p>This section isn't meant to be your one-stop shop for all troubles
  -      Tomcat, but a resource for stumbling blocks common to many first-time
  -      Tomcat'ers.&nbsp; See the <a href="#where_help">help section</a> for
  -      additional links.</p>
  +      <p><b>Non-virtual Hosts</b></p>
  +
  +      <p><a name="example_1">1</a>.&nbsp;&nbsp;&nbsp;&nbsp;All JSP and Servlet
  +        requests consisting of <a href="http://localhost/">http://localhost/</a>
  +        are sent to the &quot;rootExample&quot; Context.<br>
  +        <a name="example_2">2</a>.&nbsp;&nbsp;&nbsp;&nbsp;All JSP and Servlet
  +        requests consisting of <a href="http://localhost/rootExample/">http://localhost/subdirExample/</a>
  +        are sent to the &quot;slifkaExample&quot; Context.</p>
  +
  +        <p><b>Virtual Hosts</b><br>
  +        <br>
  +        <a name="example_3">3</a>.&nbsp;&nbsp;&nbsp; All JSP and Servlet
  +        requests consisting of <a href="http://virtualhost/">http://virtualhost/</a>
  +        are sent to &quot;vhostExample&quot; Context.<br>
  +        <a name="example_4">4</a>.&nbsp;&nbsp;&nbsp; All JSP and Servlet
  +        requests consisting of <a href="http://virtualhost/vhostSubdir/">http://virtualhost/vhostSubdir/</a>
  +        are sent to the &quot;vhostSubdir&quot; Context.
  +      </p>
  +
  +    </blockquote>
  +
  +    <p>As part of all of these configurations, servlets will be mounted as
  +    well.&nbsp; To reach a servlet registered via a particular Context's
  +    WEB-INF/<a href="uguide/tomcat_ug.html#web_xml">web.xml</a> file, we'll configure
  +    it so that appending /servlet/registeredServletName to the URL does the
  +    trick.&nbsp; For Example (2), let's say we had the
  +    following as part of our web.xml for this context:
  +      </p>
  +
  +    <blockquote>
  +      <p class="code">    &lt;servlet><br>
  +      &nbsp;&nbsp;&nbsp; &lt;servlet-name&gt;SlifkaWorld&lt;/servlet-name><br>
  +      &nbsp;&nbsp;&nbsp; &lt;servlet-class&gt;foo.bar.baz.SomeClass&lt;/servlet-class><br>
  +      &nbsp;&nbsp;&nbsp; &lt;init-param><br>
  +      &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;param-name&gt;someParameter&lt;/param-name&gt;<br>
  +      &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;param-value&gt;A value&lt;/param-value&gt;<br>
  +      &nbsp;&nbsp;&nbsp; &lt;/init-param><br>
  +    &lt;/servlet>
  +      </p>
  +
       </blockquote>
  -    <h4>&nbsp;&nbsp;&nbsp; <a name="error_8007">http://webserver:8007/ gives a
  -    500</a></h4>
  +    <p>To reach this servlet, we would request: <a href="http://localhost/servlet/SimpleServlet">http://localhost/subdirExample/servlet/SlifkaWorld</a>
  +      </p>
  +
  +    <p>If you're unsure as to what web.xml, Contexts, servlets, or webapps are,
  +    then you probably haven't read through the Tomcat <a href="uguide/tomcat_ug.html">User's
  +    Guide</a>.&nbsp; Get to it!
  +      </p>
  +
  +    <hr size="5">
  +    
  +
  +        <h3><a name="configuring_tomcat">Configuring Tomcat</a></h3>
  +
  +    <p>We can configure Tomcat independantly of the other two items on our to-do
  +    list.&nbsp; At this point,
  +    we're assuming that you've followed the directions in the <a href="uguide/tomcat_ug.html">User's
  +    Guide</a> and have Tomcat up and running in <a href="uguide/tomcat_ug.html#type_1">stand-alone</a>
  +    mode.</p>
  +
  +    <blockquote>
  +      <h4><a name="configuring_contexts">Setting up the Contexts</a></h4>
  +
  +      <blockquote>
  +        <p>First off, let's explicitly define our example Contexts in Tomcat's <a href="uguide/tomcat_ug.html#server_xml">server.xml</a>.&nbsp;
  +        The numbers preceding each configuration snippet refer to the
  +        aforementioned <a href="#running_examples">Running Examples</a>.</p>
  +
       <blockquote>
  -      <p>This is what you should see in your tomcat.log file:</p>
  +
  +        <p class="code">1.&nbsp;&nbsp;&nbsp; &lt;Context path=&quot;/&quot;<br>
  +        &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
  +        docBase=&quot;webapps/rootExample&quot;/&gt;<br>
  +        <br>
  +        2.&nbsp;&nbsp;&nbsp; &lt;Context path=&quot;/slifkaExample&quot;<br>
  +        &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
  +        docBase=&quot;webapps/slifkaExample&quot;/&gt;</p>
  +
  +    </blockquote>
  +
  +        <p>Example (3) must be placed inside a &lt;Host&gt; element in server.xml.&nbsp;
  +        This is because a &lt;Context&gt; with the same path attribute exists
  +        already; Example (1) is located at &quot;/&quot; as is (3).&nbsp; We place (4)
  +        inside the &lt;Host&gt; element as well, because we only want it to be
  +        accessible when people specify this virtual host in the
  +        request.&nbsp; For more information on the &lt;Host&gt;
  +        element, see the server.xml section of the User's Guide, and the <a href="#virtual_hosting">Virtual
  +        Hosting</a> section below.</p>
  +
  +        <p>Remember
  +        to omit the numbers 3 and 4 if you plan on pasting this in!</p>
  +
  +        <blockquote>
  +          <p class="code">&lt;Host name=&quot;fully-qualified name or IP of the
  +          virtual host&quot;&gt;<br>
  +          <br>
  +          3.&nbsp;&nbsp;&nbsp; &lt;Context path=&quot;/&quot;<br>
  +          &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
  +          docBase=&quot;webapps/vhostExample&quot;/&gt;<br>
  +          4.&nbsp;&nbsp;&nbsp; &lt;Context path=&quot;/vhostSubdir&quot;<br>
  +          &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
  +          docBase=&quot;webapps/vhostSubdir&quot;/&gt;<br>
  +          <br>
  +          &lt;/Host&gt;</p>
  +
  +        </blockquote>
  +        <p>After you've made the appropriate changes to server.xml, remember to
  +        restart Tomcat.</p>
  +
  +      </blockquote>
  +      <h4><a name="configuring_works">Making sure it all works</a></h4>
  +
         <blockquote>
  -        <p class="code">HANDLER THREAD PROBLEM: java.io.IOException: Stream
  -        broken</p>
  +        <p>Where do we stand now?&nbsp; So
  +        far it's just a normal Tomcat install, which you should be well-familiar
  +        with by now from the <a href="uguide/tomcat_ug.html">User's Guide</a>.&nbsp; Tomcat should be serving all the
  +        documents, both static and dynamic, for all of your Contexts.&nbsp; An
  +        easy way to see which Contexts are serving which requests is to watch
  +        your Tomcat log output, either via stdout/err or the log file.</p>
  +
         </blockquote>
  -      <p>By default, Tomcat listens for AJP connections on port 8007.&nbsp; AJP
  -      is the protocol used to communicate between the web server and Tomcat, <b>not</b>
  -      Tomcat and your browser.&nbsp; To test your Tomcat installation, FIX ME ?</p>
  +      <h4><a name="configuring_connector">The AJP Connector</a></h4>
  +
  +      <blockquote>
  +        <p>Before we leave this section, there's one more Tomcat aspect to
  +        discuss, the AJP &lt;Connector&gt; element in server.xml.&nbsp; This is
  +        the mechanism by which Tomcat will communicate with Apache.</p>
  +
  +        <blockquote>
  +          <p class="code">&lt;!-- Apache AJP12 support. This is also used to shut down tomcat.
  +          --><br>
  +        &lt;Connector className="org.apache.tomcat.service.PoolTcpConnector"><br>
  +          &nbsp;&nbsp;&nbsp; &lt;Parameter name="handler"<br>
  +          &nbsp;&nbsp;&nbsp;&nbsp; value="org.apache.tomcat.service.connector.Ajp12ConnectionHandler"/><br>
  +          &nbsp;&nbsp;&nbsp; &lt;Parameter name="port"<br>
  +          &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;value="8007"/><br>
  +        &lt;/Connector></p>
  +
  +        </blockquote>
  +        <p>To ensure that it is indeed listening on that port, Telnet to it or
  +        HTTP request it.&nbsp; The Ajp12ConnectionHandler will throw an
  +        exception (visible in the tomcat log file), and you'll know it's listening.&nbsp; As far as the web
  +        server adapter goes, this is all you really need to know on the Tomcat
  +        side for now.</p>
  +
  +        <p>Tomcat also supports AJP v1.3 via the Ajp13ConnectionHandler.&nbsp;
  +        We'll get to this when we discuss mod_jk and mod_jserv later on.</p>
  +
  +      </blockquote>
       </blockquote>
  -    <h4>&nbsp;&nbsp;&nbsp; <a name="error_ignore_directives">&lt;Directory&gt;
  -    and &lt;Location&gt; directives ignored</a></h4>
  +
  +    <hr size="5">
  +    
  +
  +    <h3> <a name="adapter">The Web Server Adapter</a> </h3>
  +
  +    <p> The next step in integrating Apache with Tomcat is to install a web
  +    server adapter.&nbsp; This is the piece of software that will relay
  +    information between Tomcat and Apache.&nbsp;
  +    It doesn't really belong under Apache configuration, and it doesn't
  +    really belong under Tomcat configuration, but it's required for both of them
  +    to work together. </p>
  +    
  +
  +    <p> The web server adapter answers <a href="#pull_off"> question 2</a> posed above,
  +    &quot;How will Apache forward these requests to
  +          Tomcat?&quot; </p>
  +    <blockquote>
  +    <h4> <a name="adapter_jk_vs_js">mod_jk versus mod_jserv</a>
  +    </h4>
  +
  +      <blockquote>
  +    <p>Currently there are two adapters available - jk and JServ.
  +    </p>
  +
  +    <p> Taken from our, &quot;<a href="mod_jk-howto.html">mod_jk HOWTO</a>&quot;,
  +    </p>
  +
       <blockquote>
  -      <p>FIX ME Apache never applies because forwarded to Tomcat.</p>
  +      <p>mod_jk is a replacement to the elderly mod_jserv.&nbsp; It is a completely new
  +Tomcat-Apache plugin that passed adaptation to Tomcat.&nbsp; With some luck, working
  +with it is going to be simpler for everyone.&nbsp; Here are some things to
  +      consider:</p>
  +
  +<ul>
  + <li>mod_jserv was too complex
  +     because it supported JServ specific requirements that Tomcat does not
  +     pose.</li>
  + <li>mod_jserv supported only
  +     Apache; on the other hand Tomcat supports many web servers through a
  +     compatibility layer named the jk library.&nbsp; Supporting two different modes
  +     of work became problematic in terms of support, documentation and bug
  +     fixes.&nbsp; mod_jk should fix that.</li>
  + <li>The layered approach provided
  +     by the jk library makes it easier to support both Apache1.3.x and
  +     Apache2.xx.</li>
  + <li>mod_jserv only supports AJP v1.2.&nbsp; JServ is feature complete, and
  +  won't be enhanced aside from bug fixes.</li>
  + <li>mod_jk supports
  +  <ul>
  +    <li>AJP v1.3 - reuse the TCP connection between Apache and Tomcat, much
  +      faster.</li>
  +    <li>JNI - the fastest if you have a multithreaded server like Apache 2.0.</li>
  +  </ul>
  + </li>
  +</ul>
  +
       </blockquote>
  -      <h4>&nbsp;&nbsp;&nbsp; <a name="error_web_server">Web server won't start
  -      when Tomcat is running</a></h4>
  + <font SIZE="2">
  +    </font>
  +
  +      </blockquote>
  +    <h4><a name="adapter_where">Where do I get them?</a></h4>
       <blockquote>
  -      <p>FIX ME Port conflict.</p>
  +      <p>Binaries are available for Linux and Win32 under the bin directory where
  +      you obtained the Tomcat distribution file.&nbsp;  For Linux, JServ is available
  +      as mod_jserv.so and Jk is available as mod_jk.so.&nbsp;  For Win32, JServ is
  +      available as ApacheModuleJServ.dll and Jk is available as mod_jk.dll.</p>
  +      <p>For UNIX, JServ and Jk must be build from source.&nbsp; Source is available
  +      as part of the Tomcat source distribution.&nbsp; JServ source is found in the
  +      src/native/apache/jServ directory, which contains make files for UNIX and
  +      Win32.&nbsp; Jk source is found in src/native/jk plus src/native/apache1.3 or
  +      src/native/apache2.0 depending on which Apache is the target.&nbsp; Jk make files
  +      for FreeBSD, Linux, Netware, and Win32 (as a Visual C++ 6 project file)
  +      are found in the apache1.3 and apache2.0 directories. </p>
       </blockquote>
  -      <h4>&nbsp;&nbsp;&nbsp; <a name="error_bad_command">&quot;Bad command or
  -      filename&quot; when executing Tomcat scripts</a></h4>
  +      <h4><a name="adapter_build">How do I build them?</a></h4>
       <blockquote>
  -      <p>[FIX ME] UNIX file format on DOS.&nbsp; Because Tomcat is developed on
  -      *nix (rather, the jars are built and distributed there), you may have to
  -      convert the files to PC (versus UNIX) format.</p>
  +      <p>The make files for JServ contain a small amount of documentation within.&nbsp;
  +      A little more can be found in <a href="uguide/tomcat_ug.html#jserv_build">
  +      User's Guide</a>.&nbsp; What we have below serves as a brief treatment of
  +      the mod_jk build steps for Win32 and *nix.&nbsp; This is by no means meant
  +      to be a complete treatment of the build process in all environments, just a
  +      quick hit to get you started.</p>
  +      <p>Win32 (an excerpt from our <a href="mod_jk-howto.html">mod_jk HOWTO</a>):</p>
  +      <blockquote>
  +
  +<p>The redirector was developed using Visual C++ Ver.6.0, so having this
  +environment is a prereq if you want to perform a custom build.&nbsp; The steps that you need to take are:</p>
  +
  +<ol>
  + <li>Change to the desired Apache (as explained above) source directory. </li>
  + <li>Execute the following
  +     command:<br>
  +  <span><tt><br>
  +  &nbsp;&nbsp;&nbsp;</tt></span> <span><tt>MSDEV mod_jk.dsp /MAKE ALL</tt></span><br>
  +  <br>
  +  NOTE: If msdev is not in your path, enter the full path to msdev.exe </li>
  + <li>Copy mod_jk.dll to Apache's modules directory.</li>
  +</ol>
  +
  +<p>This will build both release and debug versions of the redirector plugin (mod_jk).&nbsp;
  +An alternative will be to open <tt>mod_jk.dsp</tt> in msdev and build it using the build
  +menu. </p>
  +
  +      </blockquote>
  +      <p>UNIX:</p>
  +      <blockquote>
  +
  +<ol>
  + <li>Change to the desired Apache (as explained above) source directory. </li>
  + <li>Set the environment variable $APACHE_HOME to the root of the Apache source
  +  tree. </li>
  + <li>Execute the following command:<br>
  +  <br>
  +  &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ./build.sh&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</li>
  +</ol>
  +
  +      </blockquote>
  +      <p>That's it!</p>
       </blockquote>
  +    <h4> <a name="adapter_configuration">Configuration implications</a>
  +    </h4>
  +
  +      <blockquote>
  +    <p>The effects we're concerned with relate to the different
  +    Apache directives each adapter makes available to us.&nbsp; Conceptually, we'll be
  +    adding Apache directives to get the same job done, but depending on which
  +    adapter you've chosen, they will differ.&nbsp; We will take both
  +    adapters into consideration while explaining the Apache configuration in
  +    subsequent sections.
  +    </p>
   
  +      </blockquote>
  +    </blockquote>
  +
       <hr size="5">
  -    <h3> Starting Tomcat From Another Directory </h3>
       
  -    <h2>Setting Tomcat to Cooperate with the Apache Web Server </h2>
  -
  -    <h3> Web Server Operation </h3>
  -    <p> In a nutshell a web server is waiting for client HTTP requests.
  -        When these requests arrive the server does whatever is needed to 
  -        serve the requests by providing the necessary content. Adding a 
  -        servlet container may somewhat change this behavior. Now the web 
  -        server needs also to perform the following:
  -    <ul>
  -      <li> Load the servlet container adapter library and initialize it (prior
  -           to serving requests). </li>
  -      <li> When a request arrives, it needs to check and see if a certain 
  -           request belongs to a servlet, if so it needs to let the adapter
  -           take the request and handle it.</li>
  -    </ul>
  +    <h3> <a name="httpd">httpd.conf - Apache's main configuration file</a>
  +    </h3>
   
  -    The adapter on the other hand needs to know what requests it is
  -    going to serve, usually based on some pattern in the request URL, and to
  -    where to direct these requests.
  +    <p>Now that we've answered <a href="#pull_off">questions (2) and (3)</a>,
  +    we're ready to dive into question (1) - Apache itself.&nbsp; We need to tell
  +    Apache how to load and initialize our adapter, and that certain requests should be handled by
  +    this adapter and
  +    forwarded onto Tomcat.&nbsp; Which requests depends on your
  +    configuration.&nbsp; Surprisingly enough, this part can be just as simple as
  +    the previous two, considering that (surprise!) Tomcat does most of the work
  +    for you.
  +    </p>
   
  -    <p>
  -      Things are even more complex when the user wants to set a configuration
  -      that uses virtual hosts, or when they want multiple developers to work
  -      on the same web server but on different servlet container JVMs. We 
  -      will cover these two cases in the advanced sections.
  +    <p> Each time you start Tomcat, after it loads Contexts (both from the
  +    server.xml and automatically from $TOMCAT_HOME/webapps), it automagically
  +    generates a number of files for you.&nbsp; The two that we're concerned with
  +    are:
       </p>
   
  -    <h3> What is the Needed Configuration </h3>
  -    <p> The most obvious configuration that one can think of is the identity of the servlet URLs
  -      that are under the responsibility of the servlet container. This is clear; someone must
  -      know what requests to transmit to the servlet container...
  -      Yet there are additional configuration items that we should provide to
  -      the web-server/servlet-container combination:
       <ul>
  -      <li>We also need to provide configuration regarding the available Tomcat processes
  -    and on which TCP/IP host/port they are listening. </li>
  -      <li> We need to tell the web server the location of the adapter library (so it
  -    will be able to load it on startup). </li>
  -      <li> We need to set adapter internal information such as where and how much to log, etc. </li>
  +      <li>tomcat-apache.conf (should really be named mod_jserv.conf-auto)</li>
  +      <li>mod_jk.conf-auto</li>
       </ul>
  -    All this information must appear either in the web server configuration, or in a private
  -    configuration files used by the adapter. The next section will demonstrate how configuration
  -    can be implemented on Apache.
  -
  -
  -    <h3> Making it on Apache </h3>
  -    <p> This section shows you how to configure Apache to work with Tomcat;
  -        it tries to provide explanations as well as insight for the
  - 	    configuration directives that you should use. You can find
  -	    additional information in the
  -	    <a href="http://java.apache.org/jserv/install/index.html">
  -        jserv install page </a>.
  -    </p>
  -
  -    <p> When Tomcat starts up it will automatically generate a configuration
  -      file for Apache in <tt>TOMCAT_HOME/conf/tomcat-apache.conf</tt>. Most
  -      of the time you don't need to do anything but include this file
  -      (appending "Include TOMCAT_HOME/conf/tomcat-apache.conf") in your
  -      httpd.conf.  If you have special needs, for example an AJP port other
  -      the 8007, you can use this file as a base for  your customized
  -      configuration and save the results in another file.  If you manage
  -      the Apache configuration yourself you'll need to update it whenever
  -      you add a new context.
  +    <p>Both of these files do exactly what we want - supplement Apache's
  +    httpd.conf file with the directives necessary to have Apache (Tomcat) serve
  +    our static (dynamic) content needs.&nbsp; We'll be examining each file in
  +    the coming sections.&nbsp; For many users, directly including one of these files in httpd.conf,
  +    depending on the adapter you're using, suffices.&nbsp; For example, if
  +    you're using mod_jk (which we suggest!), you would insert the following:
       </p>
  -    <p>
  -      <b>Tomcat 3.1:</b> you must restart tomcat and apache after adding
  -      a new context; Apache doesn't support configuration changes without a
  -      restart. Also the file <tt>TOMCAT_HOME/conf/tomcat-apache.conf</tt> is 
  -	  generated when tomcat starts, so you'll need to start Tomcat before 
  -	  Apache. Tomcat will overwrite <tt>TOMCAT_HOME/conf/tomcat-apache.conf</tt> 
  -	  each startup so customized configuration should be kept elsewhere.
  +
  +    <blockquote>
  +      <p><tt>include /tomcat/conf/mod_jk.conf-auto</tt>
       </p>
   
  -    <p> The Apache-Tomcat configuration uses Apache core configuration directives
  -      as well as Jserv unique directives so it may confuse you at first, there are
  -      however two things simplifying it:
  -    <ul>
  -      <li> In general you can distinguish between the two directive
  -           "families" by noting that all the Jserv unique directives start
  -           with an "ApJServ" prefix. </li>
  -      <li> The entire Tomcat related configuration is concentrated in a
  -           single configuration file named tomcat.conf, or the automatically
  -           generated tomcat-apache.conf, so you can look at a single file.
  -      </li>
  -    </ul>
  -    Lets look now at a sample tomcat.conf file.
  -    <table border="1" 
  -           cellspacing="0" 
  -           cellpadding="0" 
  -           valign="middle">
  -      <caption valign="bottom"> 
  -        <em>A Minimalistic Apache-Tomcat Configuration </em>
  -      </caption>
  -      <tr> 
  -        <td bgcolor="#c0c0c0"> 
  -            <pre>    
  -###########################################################
  -#      A minimalistic Apache-Tomcat Configuration File    #
  -###########################################################
  +    </blockquote>
  +    <p>...of course substituting in the directory you've installed Tomcat into,
  +    in place of /tomcat.&nbsp; <b>NOTE: These files are generated each time Tomcat
  +    starts, and a Tomcat configuration change affecting whichever file you're
  +    including necessitates
  +    an Apache restart.&nbsp; If you plan on customizing this file, do it
  +    elsewhere, as it is overwritten at each restart.</b>
  +    </p>
   
  -# Note: this file should be appended or included into your httpd.conf
  +    <blockquote>
  +      <h4><a name="httpd_jk"> mod_jk.conf-auto</a>
  +    </h4>
   
  -# (1) Loading the jserv module that serves as Tomcat's apache adapter.
  -LoadModule jserv_module libexec/mod_jserv.so
  +      <blockquote>
  +        <p>For now, refer to the comments in the mod_jk.conf-auto file and
  +        <a href="mod_jk-howto.html">mod_jk HOWTO</a> for details.</p>
  +    </p>
   
  -# (1a) Module dependent configuration.
  -&lt;IfModule mod_jserv.c&gt;
  +      </blockquote>
  +      <h4><a name="httpd_jserv">tomcat-apache.conf</a>
  +    </h4>
   
  -# (2) Meaning, Apache will not try to start Tomcat.
  -ApJServManual on
  -# (2a) Meaning, secure communication is off
  -ApJServSecretKey DISABLED
  -# (2b) Meaning, when virtual hosts are used, copy the mount
  -# points from the base server
  -ApJServMountCopy on
  -# (2c) Log level for the jserv module.
  -ApJServLogLevel notice
  +      <blockquote>
  +        <p>This isn't nearly as verbose as the
  +      mod_jk file, and is therefore a bit trickier to read through.&nbsp; What
  +      you will see below is a condensed version of the .conf file generated from a server.xml
  +      containing our <a href="#running_examples">Running Examples</a>.&nbsp; To
  +      aid in our explanation of the file's contents, we've inserted comments
  +        directly, and funked with the formatting.
  +    </p>
   
  -# (3) Meaning, the default communication protocol is ajpv12
  -ApJServDefaultProtocol ajpv12
  -# (3a) Default location for the Tomcat connectors.
  -# Located on the same host and on port 8007
  -ApJServDefaultHost localhost
  -ApJServDefaultPort 8007
  -
  -# (4)
  -ApJServMount /examples /root
  -# Full URL mount
  -# ApJServMount /examples ajpv12://hostname:port/root
  -&lt;/IfModule&gt;
  -            </pre> 
  -        </td> 
  -      </tr> 
  -    </table>
  -    <p>As you can see the configuration process was split into 4 steps
  -       that will now be explained:
  -      <ol>
  -      <li> In this step we instruct Apache to load the jserv
  -           shared-object (or the NT world dll). This is a well known Apache
  -           directive. If the loading went well and the module came from a 
  -           file named mod_jserv.c (1a) we can start with the rest of the 
  -           Jserv-Tomcat configuration. </li>
  -      <li> This step sets various Jserv internal parameters, these
  -           parameters:
  -        <ul>
  -          <li> Instruct jserv not to start the Tomcat process. Automatically
  -               starting Tomcat is not implemented yet.</li>
  -          <li> Disable the secret key challenge/response between Apache and Tomcat.
  -            Again, the secret key work is not implemented yet.</li>
  -          <li> Instruct jserv to copy the base server mount points (see next
  -               section) in case of virtual hosting. </li>
  -          <li> Instruct jserv to use the notice log level. Other log levels
  -               include emerg, alert, crit, error, warn, info and debug.</li>
  -        </ul>
  -      </li>
  -      <li> This step sets the default communication parameters.
  -        Basically it says that the default protocol used for the communication
  -        is ajpv12 (do not mess with this one) and that the Tomcat process runs on
  -        the same machine and listens on port 8007. If you run Tomcat on a
  -        machine other than the one used
  -        for Apache you should either update your ApJServDefaultHost or use a full
  -        URL when mounting contexts (see next). Also, if you configured the Tomcat
  -        connectors to use a port other then 8007, you should update your
  -        ApJServDefaultPort or use a full URL when mounting contexts.
  -      </li>
  -      <li> This step mounts a context to Tomcat. Basically it says that
  -           all the web server paths that start with /examples go to Tomcat. This
  -           ApJServMount example is a rather simple one, in fact ApJServMount can
  -           also provide information regarding the communication protocol to be used
  -           and the location where the Tomcat process listens, for example:
  -           <div><tt>ApJServMount /examples ajpv12://hostname:port/root</tt></div>
  -           mounts the context /examples to a Tomcat process that runs on host
  -           "hostname" and listens on port number "port".
  -      </li>
  -    </ol>
  -    Now that you understand the different configuration instructions in the sample
  -    file, how can you add it to the Apache configuration? One "simple" method is to
  -    write it's content in the httpd.conf (the Apache configuration file), this however
  -    can be very messy. Instead you should use the Apache include directive. At the end
  -    of the Apache configuration file (httpd.conf) add the following directive:
  -    <div> <tt>include &lt;full path to the Tomcat configuration file&gt; </tt></div>
  -    for example:
  -    <div> <tt>include /tome/tomcat/conf/tomcat.conf </tt></div> This
  -    will add your Tomcat configuration to Apache, after that you should copy
  -    the jserv module to the Apache libexec (or modules in the Win32 case)
  -    directory and restart (stop+start) Apache. It should now be able to
  -    connect to Tomcat.
  -
  -    <h3> Obtaining the Jserv Module (mod_jserv) </h3>
  -    <p> As previously stated, we need a web server adapter to sit in Apache and redirect
  -      requests to Tomcat. For Apache, this adapter is a slightly modified version of
  -      mod_jserv.
  -    </p>
  -    <p> You may try to look <a href="http://jakarta.apache.org/downloads/binindex.html">
  -      here </a> and see if there is an already pre-built version of mod_jserv that
  -      suites your OS (Usually there is one for NT), however, being a native library you
  -      should not expect that yet (too many OS's, not enough developers, life
  -      too short...).
  -      Moreover, small variations in the way you built Apache/Your specific UNIX variant may
  -      result in dynamic linking errors. You should really try to build mod_jserv for your
  -      system (don't panic, it is not that hard!).
  +      <p>Before we get started, there is one JServ directive used extensively
  +      that you should know about: ApJServMount.&nbsp; ApJServMount has the
  +      following syntax:
       </p>
  -    <p>
  -      Building mod_jserv on <b>UNIX</b> involves the following:
  -    <ol>
  -      <li> Download the source distribution of Tomcat from
  -    <a href="http://jakarta.apache.org/downloads/sourceindex.html"> here</a>. </li>
  -      <li> Uncompress it into some directory. </li>
  -      <li> Building the module:
  -    <ul>
  -      <li> Change directory into jakarta-tomcat/src/native/apache/jserv/</li>
  -      <li> Execute the build command <div><tt> apxs -c -o mod_jserv.so *.c  </tt></div> 
  -        apxs is part of the Apache distribution and should be located in your
  -        APACHE_HOME/bin.</li>
  -    </ul>
  -      </li>
  -    </ol>  
  -    Building mod_jserv for <b>Win32</b> is less likely (you already have a downloadable dll
  -    for Win32). Yet if you <em>want</em> to build it you should install Visual C++ and 
  -    perform the following:
  -    <ol>
  -      <li> Download the source distribution of Tomcat from
  -    <a href="http://jakarta.apache.org/downloads/sourceindex.html"> here</a>. </li>
  -      <li> Unzip it into some directory. </li>
  -      <li> Building the module:
  -    <ul>
  -      <li> Change directory into jakarta-tomcat\src\native\apache\jserv</li>
  -      <li> Add  Visual C++ into your environment by executing the script
  -        VCVARS32.BAT. </li>
  -      <li> Execute the build command <div><tt> nmake -f Makefile.win32 </tt></div>
  -        nmake is the Visual C++ make program.</li>
  -    </ul>
  -      </li>
  -    </ol>
  -    That's it; you have built mod_jserv...
  -    <h3> Making Apache Serve your Context's Static Files </h3>
  -    <p> The previous Apache-Tomcat configuration file was somewhat
  -	    inefficient, it instructed Apache to send any request for a resource
  -        that starts with the <tt>/examples</tt> prefix to be served by
  -        Tomcat. Do we really want that? There are many static files that may
  -        be a part of our servlet context (for example images and static
  -        HTML), why should Tomcat serve these files?
  -    </p>
  -    <p>You may actually have reasons for doing that, for example:
  -        <ol>
  -            <li>You may want to configure Tomcat based security for these
  -                resources. </li>
  -            <li>You may want to follow users requests for static resources
  -                using interceptors. </li>
  -        </ol>
  -       In general however, this is not that case; and making Tomcat save
  -       static files is just a CPU waste. We should instead have Apache serve
  -       these static files and not Tomcat. Lets look now at a sample
  -       tomcat.conf file that does exactly that:
  -    <p> Having Apache serve the static files requires the following:
  -        <ol>
  -            <li>Instructing Apache to send all servlet requests to Tomcat. </li>
  -            <li>Instructing Apache to send all JSP requests to Tomcat. </li>
  -        </ol>
  -        and leaving Apache to handle the rest. Lets look now at a sample 
  -        tomcat.conf file that does exactly that:
  +
  +      <blockquote>
  +      <p>ApJServMount &lt;URI&gt; &lt;Tomcat process location and context in URI
  +      format (relative or full)&gt;
  +    </p>
  +
  +      </blockquote>
  +      <p>In English, this says, &quot;Any request that starts with &lt;URI&gt;
  +      should be passed on to &lt;Tomcat process location and context&gt; for
  +      execution.&quot;&nbsp; Don't worry if it's not quite clear yet, examples
  +      follow!
  +    </p>
  +
  +      <p>This file has been modified quite a bit as the auto-generated one doesn't do
  +      exactly what we want, and isn't laden with comments :-) but it comes pretty close!&nbsp; With the knowledge
  +      gained thus far, this shouldn't be too much of a leap, so here goes:&nbsp;
  +    </p>
  +
       <table border="1" 
              cellspacing="0" 
              cellpadding="0" 
  -           valign="middle">
  +           valign="middle" width="625">
         <caption valign="bottom"> 
  -        <em>Apache-Tomcat Configuration where Apache Serves the Static Content</em>
  +        <em><b>Apache-Tomcat Configuration where Apache Serves the Static Content</b> </em>
         </caption>
         <tr> 
  -        <td bgcolor="#c0c0c0"> 
  -          <pre>    
  -######################################################################
  -#              Apache-Tomcat Smart Context Redirection               #
  -######################################################################
  -LoadModule jserv_module modules/ApacheModuleJServ.dll
  -&lt;IfModule mod_jserv.c&gt;
  -ApJServManual on
  +        <td bgcolor="#c0c0c0" width="621"> 
  +          <pre>#######################################################
  +#
  +# BEGIN JServ Configuration
  +#
  +# Step (1) - See description following this sample file
  +LoadModule jserv_module libexec/mod_jserv.so
  +&lt;IfModule mod_jserv.c&gt;</pre> 
  +          <pre># Step (2) - See description following this sample file
  +ApJServManual          on
  +ApJServSecretKey       DISABLED
  +ApJServMountCopy       on
  +ApJServLogLevel        notice</pre> 
  +          <pre># Step (3) - See description following this sample file
   ApJServDefaultProtocol ajpv12
  -ApJServSecretKey DISABLED
  -ApJServMountCopy on
  -ApJServLogLevel notice
  -
  -ApJServDefaultHost localhost
  -ApJServDefaultPort 8007
  +ApJServDefaultPort     8007
  +# ADDED THIS LAST ONE MANUALLY - ed.
  +ApJServDefaultHost     localhost</pre> 
  +          <pre>#
  +# END JServ Configuration
  +#
  +#######################################################</pre> 
  +          <pre># The following two lines register the JSP type with
  +# Apache and instruct it to have all JSP requests
  +# handled by the jserv-servlet handler.
  +AddType      text/jsp .jsp
  +AddHandler   jserv-servlet .jsp</pre> 
  +          <pre># WAS: ApJServMount /servlet /ROOT
  +# WHY: We changed it because we want to explicitly state
  +#      that all requests to /servlet are sent to our
  +#      &quot;/rootExample&quot; context in Tomcat.  See the details
  +#      of <a href="#example_1">Example (1)</a> above for more information.
   
  +ApJServMount /servlet /rootExample</pre> 
  +          <pre>#######################################################
   #
  -# Mounting a single smart context:
  +# Step (4) - BEGIN <a href="#example_1">Example (1)</a> Configuration
  +#</pre> 
  +          <pre># Step (4a)
  +# WAS: Alias /rootExample &quot;/home/rslifka/tomcat/webapps/rootExample&quot;
  +# WHY: Why did we remove it?  Well, this was here so that requests
  +#      to <a href="http://localhost/rootExample">http://localhost/rootExample</a> would serve the right
  +#      static documents.  Unfortunately, we wanted our application residing
  +#      at the root of the server, and not under the /rootExample directory.
   #
  -# (1) Make Apache know about the context location.
  -Alias /examples D:\tomcat\webapps\examples
  -# (2) Optional, customize Apache context service.
  -&lt;Directory &quot;D:\tomcat\webapps\examples&quot;&gt;
  +#      The DocumentRoot should be set instead.</pre> 
  +          <pre>DocumentRoot /home/rslifka/tomcat/webapps/rootExample</pre> 
  +          <pre># Step (4b)
  +# WHY: Just like a regular Apache setup, we're setting some
  +#      traits of how we'd like requests handled.  See the Apache
  +#      <a href="http://www.apache.org/docs/">documentation</a> for more detail than you could ever want. ;)
  +#      This particular setup leaves directory indices on, which
  +#      most people turn off.  To do that, you'd use the uncommented
  +#      line in the middle of the &lt;Directory&gt; element.
  +&lt;Directory &quot;/home/rslifka/tomcat/webapps/rootExample&quot;&gt;
       Options Indexes FollowSymLinks
  -# (2a) No directory indexing for the context root.
  -#    Options -Indexes
  -# (2b) Set index.jsp to be the directory index file.
  -#    DirectoryIndex index.jsp
  -&lt;/Directory&gt;
  -# (3) Protect the WEB-INF directory from tampering.
  -&lt;Location /examples/WEB-INF/&gt;
  +#   Options -Indexes
  +&lt;/Directory&gt;</pre> 
  +          <pre># Step 4(c)
  +# WAS: ApJServMount /rootExample/servlet /rootExample
  +# WHY: Why did we remove it?  Because we remapped the first
  +#      ApJServMount further up, before the configuration for
  +#      this context.</pre> 
  +          <pre># Step 4(d)
  +# WHY: As per the <a href="http://java.sun.com/products/servlet/download.html">servlet spec</a>, nothing under WEB-INF should
  +#      be viewable since that's where all your gold (web.xml, etc.) is.
  +#      See the <a href="uguide/tomcat_ug.html">User's Guide</a> and servlet spec for more information on 
  +#      the application hierarchy.
  +&lt;Location &quot;/home/rslifka/tomcat/webapps/rootExample/WEB-INF/&quot;&gt;
       AllowOverride None
       deny from all
  -&lt;/Location&gt;
  -# (4) Instructing Apache to send all the .jsp files under the context to the 
  -# jserv servlet handler. 
  -&lt;LocationMatch /examples/*.jsp&gt;
  -    SetHandler jserv-servlet
  -&lt;/LocationMatch&gt;
  -# (5) Direct known servlet URLs to Tomcat.
  -ApJServMount /examples/servlet /examples
  -
  -# (6) Optional, direct servlet only contexts to Tomcat.
  -ApJServMount /servlet /ROOT
  -&lt;/IfModule&gt;
  -      </pre> 
  +&lt;/Location&gt;</pre> 
  +          <pre>#
  +# END Example(1) Configuration
  +#
  +#######################################################</pre> 
  +          <pre>#######################################################
  +#
  +# Step (5) - BEGIN <a href="#example_2">Example (2)</a> Configuration
  +#</pre> 
  +          <pre>Alias /subdirExample /home/rslifka/tomcat/webapps/slifkaExample
  +ApJServMount /subdirExample/servlet /slifkaExample</pre> 
  +          <pre>&lt;Location &quot;/home/rslifka/tomcat/webapps/slifkaExample/WEB-INF/&quot;&gt;
  +    AllowOverride None
  +    deny from all
  +&lt;/Location&gt;</pre> 
  +          <pre>&lt;Directory &quot;/home/rslifka/tomcat/webapps/slifkaExample&quot;&gt;
  +    Options Indexes FollowSymLinks
  +&lt;/Directory&gt;</pre> 
  +          <pre>#
  +# END Example(2) Configuration
  +#
  +#######################################################</pre> 
  +          <pre>&lt;/IfModule&gt;</pre> 
           </td> 
         </tr> 
       </table>
       
  -    <p>
  -      As you can see, the beginning of this configuration file is the same
  -      as seen in the previous example. The last step (mounting a context),
  -      however,  was replaced in a long series of Apache and ApJServ
  -      configuration directives that will now be explained:
  -      <ol>
  -        <li> This step informs Apache of the context location and aliases it
  -             to an Apache virtual directory. This way Apache can serve files
  -             from this directory.</li>
  -        <li> This optional step instructs Apache more about how to serve the
  -             context; for example you can decide if Apache will allow
  -             directory indexing (listing) or set a special index file.</li>
  -        <li> This step instructs Apache to protect the WEB-INF directory
  -             from client access. For security reasons it is important to
  -             prevent visitors from viewing the content of the WEB-INF
  -             directory, for example web.xml can provide valuable information
  -             for intruders. This step blocks the WEB-INF content from
  -             visitors. </li>
  -        <li> This step instructs Apache to serve all the jsp locations
  -             within the context using the jserv servlet handler. The servlet
  -             handler redirects these requests based on the default host and
  -             port.</li>
  -        <li> This step mounts specific servlet URLs to Tomcat. You should
  -             note that you should have as many such mount directives as the
  -             number of specific servlet URLs. </li>
  -        <li> This last step is an example for the addition of servlet only 
  -             context to Tomcat. </li>                                       
  -      </ol>
  -      
  -      It is easy to see that this configuration is much more complex and
  -      error prone then the first example, this however is the price that you 
  -      should (for now) pay for improved performance.
  +        <p>All of the above directives, with the exception of anything prefixed
  +        by &quot;ApJServ&quot; are extensively documented in the <a href="http://www.apache.org/docs/">Apache
  +        User's Guide</a>.&nbsp; If you find our coverage brief, please look
  +        there for the desired information.
  +    </p>
  +
  +        <p>Below, we go into further detail about each commented step:
  +    </p>
  +
  +        <blockquote>
  +          <p>1.&nbsp;&nbsp;&nbsp; Instruct Apache to load the jserv
  +          shared-object (or the NT world dll).
  +    </p>
  +
  +          <blockquote>
  +            <p>If the loading went well and the module came from a file named
  +            mod_jserv.c (1a) we can start with the rest of the configuration.
  +    </p>
   
  -    <h3> Configuring for Multiple Tomcat JVMs </h3>
  +          </blockquote>
  +          <p>2.&nbsp;&nbsp;&nbsp; This step sets various JServ internal
  +          parameters, in order:</p>
  +          <ul>
  +            <li> Instruct JServ not to start the Tomcat process. Automatically
  +               starting Tomcat is not implemented yet.</li>
  +            <li> Disable the secret key challenge/response between Apache and Tomcat.
  +            Again, the secret key work is not implemented yet.</li>
  +            <li> Instruct JServ to copy the base server mount points (see next
  +               section) in case of virtual hosting.</li>
  +            <li> Instruct JServ to use the notice log level. Other log levels
  +               include emerg, alert, crit, error, warn, info and debug.</li>
  +          </ul>
  +          <p>3.&nbsp;&nbsp;&nbsp; This step sets JServ's default communication
  +          parameters.</p>
  +          <blockquote>
  +            <p>It says that the default protocol used for the communication
  +        is ajpv12 (do not mess with this one) and that the Tomcat process runs on
  +        the same machine and listens on port 8007.&nbsp; If you run Tomcat on a
  +        machine other than the one used
  +        for Apache you should either update your ApJServDefaultHost or use a full
  +        URL when mounting contexts (see next). Also, if you configured the Tomcat
  +        connectors to use a port other then 8007, you should update your ApJServDefaultPort or use a full URL when mounting contexts.</p>
  +          </blockquote>
  +          <p>4.&nbsp;&nbsp;&nbsp; These steps &quot;register&quot; (for lack of
  +          a better word) our <a href="#example_1">Example (1)</a> context
  +          w/Apache.</p>
  +          <blockquote>
  +            <p> Most everything is explained up inside the example, but there
  +            are a few things you should know.&nbsp; The first is that, as you
  +            can see, contexts mounted at the root of your web (e.g. <a href="http://localhost/">http://localhost/</a>
  +            versus <a href="http://localhost/myApp">http://localhost/myApp</a>)
  +            server require a little more work than they would otherwise.&nbsp;
  +            Second, don't take anything auto-generated for granted.&nbsp; It's a
  +            very nice feature and works in many, many cases.&nbsp; Still though,
  +            you're setting up two complicated pieces of software and should
  +            probably be familiar with what it all means and why/how it all
  +            works!&nbsp; Tomcat has no way of knowing how you're going to
  +            &quot;register&quot; the context in Apache, and does its best to
  +            guess.</p>
  +          </blockquote>
  +            <p> 5.&nbsp;&nbsp;&nbsp; These steps register our <a href="#example_2">Example
  +            (2)</a> context w/Apache.</p>
  +          <blockquote>
  +            <p>There are two differences between Example (1) and Example (2)'s
  +            setup.&nbsp; First, since the DocumentRoot is already defined and
  +            mounted to our rootExample content (Example (1)), we use an Alias to
  +            tell Apache how to serve up our static documents.&nbsp; Second, we
  +            modify the ApJServMount directive to reflect the path that the
  +            context resides in (/subdirExample).</p>
  +          </blockquote>
  +        </blockquote>
  +        <p>Your configuration is complete!&nbsp; All you have to do now is
  +        restart Apache, and you're cooking with gas.</p>
  +      </blockquote>
  +    </blockquote>
  +
  +    <hr size="5">
  +    
  +        <h3><a name="multiple">Multiple Tomcat JVMs</a>
  +    </h3>
  +
       <p>
           Sometimes it is useful to have different contexts handled by 
           different JVMs, for example: 
  @@ -493,386 +769,553 @@
               <li> When we want to have multiple developers work on a private
                    Tomcat process but use the same web server. </li>
           </ul>
  -        Implementing such schemes where different contexts are served by
  -        different JVMs is very easy and the following configuration file
  -        demonstrates this:
  -    <p>
  +    Implementing such schemes where different contexts are served by different
  +    JVMs is very easy and the following configuration file demonstrates this:
  +    <blockquote>
  +      <h4><a name="multiple_tomcat">Tomcat Configuration</a></h4>
  +      <blockquote>
  +        <p>Here's where we have to step back to Tomcat.&nbsp;&nbsp; First, you
  +        have to be running two separate instances of Tomcat, hence the &quot;mutliple
  +        JVMs&quot;.&nbsp; Of course, each instance of Tomcat will need its web
  +        adapter Connector listening on a unique port.&nbsp; You'll remember the
  +        following snippet from server.xml in our AJP section:</p>
  +        <blockquote>
  +          <p class="code">&lt;!-- Apache AJP12 support. This is also used to shut down tomcat.
  +          --><br>
  +        &lt;Connector className=&quot;org.apache.tomcat.service.PoolTcpConnector&quot;&gt;<br>
  +          &nbsp;&nbsp;&nbsp; &lt;Parameter name="handler"&nbsp;<br>
  +          &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
  +          value="org.apache.tomcat.service.connector.Ajp12ConnectionHandler"/><br>
  +          &nbsp;&nbsp;&nbsp; &lt;Parameter name="port"<br>
  +          &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
  +          value="8007"/><br>
  +        &lt;/Connector></p>
  +        </blockquote>
  +        <p>The key here is that each port parameter's &quot;value&quot;
  +        attribute must have a different value.&nbsp; To keep in sync, let's
  +        pretend that our <a href="#example_1">Example (1)</a> has its own
  +        instance of Tomcat, as does <a href="#example_2">Example (2)</a>.&nbsp;
  +        Example(1)'s port is 8007 and Example (2)'s port is 8009; they are both
  +        running on the localhost.</p>
  +        <p><b>NOTE: There are other changes required to run multiple instances
  +        of Tomcat (e.g. specifying different logging directories).&nbsp; Those changes and more are covered in the <a href="uguide/tomcat_ug.html">User's
  +        Guide</a>.</b></p>
  +      </blockquote>
  +      <h4><a name="multiple_apache">Apache Configuration</a></h4>
  +      <blockquote>
  +        <p>We've snipped out the irrelevant sections (at least to this example)
  +        of the .conf file.&nbsp; The only change(s) you need to make, is to be a
  +        bit more specific when instructing the web server adapter on how to find the Tomcat process
  +        responsible for your context.</p>
  +        <blockquote>
       <table border="1" 
           cellspacing="0" 
           cellpadding="0"     
  -        valign="middle">
  +        valign="middle" width="615">
         <caption valign="bottom" width="100%"> 
           <em>Apache-Tomcat Configuration with per Context JVM </em>
         </caption>
         <tr> 
  -        <td bgcolor="#c0c0c0"> 
  +        <td bgcolor="#c0c0c0" width="611"> 
             <pre>    
  -######################################################################
  -#             Apache-Tomcat with JVM per Context                     #
  -######################################################################
  -LoadModule jserv_module modules/ApacheModuleJServ.dll
  -&lt;IfModule mod_jserv.c&gt;
  -ApJServManual on
  -ApJServDefaultProtocol ajpv12
  -ApJServSecretKey DISABLED
  -ApJServMountCopy on
  -ApJServLogLevel notice
  -
  -ApJServDefaultHost localhost
  -ApJServDefaultPort 8007
  -
  -# Mounting the first context.
  -ApJServMount /joe ajpv12://joe.corp.com:8007/joe
  -
  -# Mounting the second context.
  -ApJServMount /bill ajpv12://bill.corp.com:8007/bill
  -&lt;/IfModule&gt;
  +[ snip! ]
  +
  +# Mounting Example (1)
  +ApJServMount /servlet ajpv12://localhost:8007/rootExample
  +
  +
  +# Mounting Example (2)
  +ApJServMount /subdirExample/servlet ajpv12://localhost:8009/slifkaExample</pre> 
  +          <pre>[ snip! ]
               </pre> 
           </td> 
         </tr> 
       </table>
  -    <p>
  -    As you can see in the previous example, using several JVMs (even even 
  -	those that run on different machines) can be accomplished easily by 
  -	using a full ajp URL mount. In this full URL we actually specify the 
  -	host where the Tomcat process is located and it's port.
  -    </p>
  -    <p>
  -    Had the two Tomcat processes run on the same machine, we would have to
  -    configure each of them with different connector ports. For example,
  -    assuming that the two JVMs runs on localhost, the Apache-Tomcat
  -    configuration should have something that looks like:
  -    </p>
  +        </blockquote>
  +        <p>As you can see, the key to integrating multiple instances with Apache
  +        is to specify the full URL when mounting via the ApJServMount
  +        directive.&nbsp; This is how you're able to tell JServ that the Tomcat
  +        processes are each listening on separate ports.&nbsp; If the Tomcat
  +        instances were running on separate machines, you would change the &quot;localhost&quot;
  +        to the appropriate machine name in the ApJServMount directive(s).<p><b>NOTE:
  +        Your $TOMCAT_HOME/conf/tomcat-apache.conf file is overwritten each time
  +        you restart Tomcat.&nbsp; This configuration requires a custom tomcat-apache.conf,
  +        so making your changes to, and subsequently including, one of the
  +        auto-generated ones is a *bad idea*.&nbsp; Your changes will be
  +        overwritten each time Tomcat restarts.</b>
  +      </blockquote>
  +    </blockquote>
  +
  +    <hr size="5">
  +    
  +    <h3> <a name="virtual_hosting"> Virtual Hosting</a> </h3>
  +    <p>Once you've got Apache configured correctly with the &lt;VirtualHost&gt;
  +    entries (discussed in part below), getting virtual hosting working under Tomcat isn't that difficult.
  +    There are two ways achieving this:</p>
  +    <ol>
  +      <li><b>Use a different Tomcat port (and therefore <a href="#multiple">multiple
  +        instances</a> of Tomcat) between Apache and Tomcat per virtual
  +        host.</b><br>
  +        &nbsp;
  +        <ul>
  +          <li>Advantages
  +            <ul>
  +              <li>Works in Tomcat 3.1 and 3.2</li>
  +              <li>Because it sends calls for different Virtual Hosts to
  +                different Tomcat JVMs, this can be used to spread the load over
  +                several machines</li>
  +              <li>Development can occur in isolation (an instance per developer)
  +                but still use the same machine, and same overall installation of
  +                Tomcat<br>
  +                &nbsp;</li>
  +            </ul>
  +          </li>
  +          <li>Disadvantages
  +            <ul>
  +              <li>Doesn't scale well (an instance of Tomcat per virtual host is
  +                required)</li>
  +              <li>Difficult to maintain for more than
  +                a few hosts (requires a different server.xml for each virtual
  +                host)<br>
  +                &nbsp;</li>
  +            </ul>
  +          </li>
  +        </ul>
  +      </li>
  +      <li><b>Use the &lt;Host&gt; directive in Tomcats' server.xml file<br>
  +        &nbsp;</b>
  +        <ul>
  +          <li>Advantages
  +            <ul>
  +              <li>Easier to set up</li>
  +              <li>Uses less system resources =&gt; scales much better (only one
  +                Tomcat instance, single adapter connector port)<br>
  +                &nbsp;</li>
  +            </ul>
  +          </li>
  +          <li>Disadvantages
  +            <ul>
  +              <li>Only works under Tomcat 3.2</li>
  +              <li>If Tomcat needs to be restarted for one virtual host, it needs
  +                to be restarted for all of them</li>
  +            </ul>
  +          </li>
  +        </ul>
  +      </li>
  +    </ol>
  +    <p>To set up Apache and Tomcat using the first method, you need to set up a
  +    different ports for Apache and Tomcat to communicate for each host. Here's a
  +    sample Apache configuration (which uses mod_jserv):</p>
  +
       <table border="1"
  -        cellspacing="0" 
  +        cellspacing="0"
           cellpadding="0"     
  -        valign="middle">
  +        valign="middle" width="536">
         <caption valign="bottom" width="100%"> 
  -        <em> Same Machine Multiple JVM Apache-Tomcat Configuration </em>
  +        <em><b>Option 1 - Different Tomcat for each Apache Virtual Host</b></em>
         </caption>
         <tr> 
  -        <td bgcolor="#c0c0c0"> 
  -          <pre>    
  -######################################################################
  -#      Apache-Tomcat with Same Machine JVM per Context               #
  -######################################################################
  -LoadModule jserv_module modules/ApacheModuleJServ.dll
  -&lt;IfModule mod_jserv.c&gt;
  -ApJServManual on
  -ApJServDefaultProtocol ajpv12
  -ApJServSecretKey DISABLED
  -ApJServMountCopy on
  -ApJServLogLevel notice
  -
  -ApJServDefaultHost localhost
  -ApJServDefaultPort 8007
  -
  -# Mounting the first context.
  -ApJServMount /joe ajpv12://localhost:8007/joe
  -
  -# Mounting the second context.
  -ApJServMount /bill ajpv12://localhost:8009/bill
  -&lt;/IfModule&gt;
  +        <td bgcolor="#c0c0c0" width="532"> 
  +            <pre>    
  +[ snip! ]</pre> 
  +            <pre># Mount Example (3)s virtual host
  +&lt;VirtualHost 9.148.16.139&gt;
  +ServerName www.virtualhost.com
  +DocumentRoot path-to-your-docbase
  +ApJServMount /servlet ajpv12://localhost:8007/vhostExample
  +&lt;/VirtualHost&gt;
  +
  +# Mount Example (4)s virtual host
  +&lt;VirtualHost 9.148.16.139&gt;
  +ServerName www.virtualhost.com
  +ApJServMount /servlet ajpv12://localhost:8009/examples
  +DocumentRoot path-to-your-docbase
  +&lt;/VirtualHost&gt;</pre> 
  +            <pre>[ snip! ]
               </pre> 
           </td> 
         </tr> 
       </table>
  +    
  +    <p><b>NOTE</b>: Remember to set the DocumentRoot so Apache knows where to
  +    serve the static files from.&nbsp; In our mod_jserv and mod_jk examples,
  +    this was done by specifying an Alias since the DocumentRoot was already
  +    defined.&nbsp; Keep in mind that the ApJServMount is relative from the
  +    DocumentRoot.&nbsp; What's a DocumentRoot and what's an Alias?&nbsp; See the <a href="http://www.apache.org/docs/">Apache
  +        User's Guide</a>!
  +    </p>
  +
       <p>
  -    Looking at the above file you can see that we have two explicit ApJServ
  -    mount points each pointing to a different port on the same machine. It
  -    is clear that this configuration requires support from the configuration
  -    found in the server.xml files. We will need in these files different
  -    &lt;Connector&gt; configurations, for the different Tomcat processes. We
  -    will actually need two different server.xml files (lets call them
  -    server_joe.xml and server_bill.xml) with different &lt;Connector&gt;
  -    entries as shown in the next two samples:
  +        As you can see from the above example, using Tomcat in a virtual hosting environment isn't that different
  +        insofar as Apache is concerned.&nbsp; Of course, you'll need to setup
  +        the appropriate &lt;VirtualHost&gt; entries, but other than
  +        that, there isn't much difference.&nbsp; Inside each virtual host entry,
  +        you have all of your context-specific information in the usual way, and
  +        that's it really.
       </p>
  -    <table border="1" 
  -        cellspacing="0" 
  +
  +    <p>
  +        Here is an example setup for a machine serving virtual hosts using the
  +        second method described above.
  +    </p>
  +
  +    <table border="1"
  +        cellspacing="0"
           cellpadding="0"     
  -        valign="middle">
  +        valign="middle" width="536">
         <caption valign="bottom" width="100%"> 
  -        <em> Joe's server.xml file </em>
  +        <em><b>Option 2 - Same Tomcat for all Virtual Hosts (httpd.conf)</b></em>
         </caption>
         <tr> 
  -        <td bgcolor="#c0c0c0"> 
  -          <pre>    
  -&lt;?xml version=&quot;1.0&quot; encoding=&quot;ISO-8859-1&quot;?&gt;
  +        <td bgcolor="#c0c0c0" width="532"> 
  +            <pre>    
  +[ snip! ]</pre> 
  +            <pre># Minimalistic Virtual Host configuration</pre> 
  +            <pre>&lt;VirtualHost 192.168.0.1&gt;
  +ServerName host1
  +DocumentRoot /web/host1/html
  +ApJServMount /servlet /ROOT
  +&lt;Directory &quot;/web/host1/html/WEB-INF&quot;&gt;
  +Options None
  +Deny from all
  +&lt;/Directory&gt;
  +&lt;/VirtualHost&gt;
   
  -&lt;Server&gt;
  -    &lt;!-- Debug low-level events in XmlMapper startup --&gt;
  -    &lt;xmlmapper:debug level=&quot;0&quot; /&gt;
  -
  -    &lt;!--  @@@
  -        Note, the log files are suffixed with _joe to distinguish
  -        them from the bill files. 
  -    --&gt;
  -
  -    &lt;Logger name=&quot;tc_log&quot; 
  -            path=&quot;logs/tomcat_joe.log&quot;
  -            customOutput=&quot;yes&quot; /&gt;
  -
  -    &lt;Logger name=&quot;servlet_log&quot; 
  -            path=&quot;logs/servlet_joe.log&quot;
  -            customOutput=&quot;yes&quot; /&gt;
  -
  -    &lt;Logger name=&quot;JASPER_LOG&quot; 
  -        path=&quot;logs/jasper_joe.log&quot;
  -            verbosityLevel = &quot;INFORMATION&quot; /&gt;
  -
  -    &lt;!--  @@@
  -        Note, the work directory is suffixed with _joe to distinguish
  -        it from the bill work directory.
  -    --&gt;
  -    &lt;ContextManager debug=&quot;0&quot; workDir=&quot;work_joe&quot; &gt;
  -        &lt;!-- Context level Setup --&gt;	
  -        &lt;ContextInterceptor 
  -		    className=&quot;org.apache.tomcat.context.AutoSetup&quot; /&gt;
  -        &lt;ContextInterceptor 
  -		    className=&quot;org.apache.tomcat.context.DefaultCMSetter&quot; /&gt;
  -        &lt;ContextInterceptor 
  -		    className=&quot;org.apache.tomcat.context.WorkDirInterceptor&quot; /&gt;
  -        &lt;ContextInterceptor 
  -		    className=&quot;org.apache.tomcat.context.WebXmlReader&quot; /&gt;
  -        &lt;ContextInterceptor 
  -		    className=&quot;org.apache.tomcat.context.LoadOnStartupInterceptor&quot; /&gt;
  -        &lt;!-- Request processing --&gt;
  -        &lt;RequestInterceptor 
  -		    className=&quot;org.apache.tomcat.request.SimpleMapper&quot; debug=&quot;0&quot; /&gt;
  -        &lt;RequestInterceptor 
  -		    className=&quot;org.apache.tomcat.request.SessionInterceptor&quot; /&gt;
  -        &lt;RequestInterceptor 
  -		    className=&quot;org.apache.tomcat.request.SecurityCheck&quot; /&gt;
  -        &lt;RequestInterceptor 
  -		    className=&quot;org.apache.tomcat.request.FixHeaders&quot; /&gt;
  -
  -        &lt;!-- @@@ This connector uses port number 8007 for it's ajp communication --&gt;
  -        &lt;Connector 
  -		    className=&quot;org.apache.tomcat.service.SimpleTcpConnector&quot;&gt;
  -            &lt;Parameter 
  -                name=&quot;handler&quot; 
  -                value=&quot;org.apache.tomcat.service.connector.Ajp12ConnectionHandler&quot;/&gt;
  -            &lt;Parameter name=&quot;port&quot; value=&quot;8007&quot;/&gt;
  -        &lt;/Connector&gt;
  -
  -        &lt;!-- @@@ the /jow context --&gt;
  -        &lt;Context path=&quot;/joe&quot; docBase=&quot;webapps/joe&quot; debug=&quot;0&quot; reloadable=&quot;true&quot; &gt; 
  -        &lt;/Context&gt;
  -    &lt;/ContextManager&gt;
  -&lt;/Server&gt;       
  +&lt;VirtualHost 192.168.0.1&gt;
  +ServerName host2
  +DocumentRoot /web/host2/html
  +ApJServMount /servlet /ROOT
  +&lt;Directory &quot;/web/host2/html/WEB-INF&quot;&gt;
  +Options None
  +Deny from all
  +&lt;/Directory&gt;
  +&lt;/VirtualHost&gt;</pre> 
  +            <pre>[ snip! ]
               </pre> 
           </td> 
         </tr> 
       </table>
  +    
       <p>
  -        When looking at server_joe.xml you can see that the 
  -        &lt;Connector&gt; is configured for port 8007. In server_bill.xml 
  -        (see next) on the other hand the &lt;Connector&gt; is configured for 
  -        port 8009.
  +        This creates two virtual hosts, host1 and host2, both running off of the
  +        same IP - 192.168.0.1.&nbsp; Any requests for paths beginning with
  +        &quot;/servlet&quot; are passed to Tomcat for processing, as are JSP
  +        requests, providing of course that you've added the aforementioned
  +        AddType and AddHandler directives.
       </p>
  -    <table border="1" 
  -        cellspacing="0" 
  +
  +    <p>
  +        Next, you need to configure Tomcat's <b>server.xml</b> file.
  +    </p>
  +
  +    <table border="1"
  +        cellspacing="0"
           cellpadding="0"     
  -        valign="middle">
  +        valign="middle" width="536">
         <caption valign="bottom" width="100%"> 
  -        <em> Bill's server.xml file </em>
  +        <em><b>Option 2 - Same Tomcat for all Virtual Hosts (server.xml)</b></em>
         </caption>
         <tr> 
  -        <td bgcolor="#c0c0c0"> 
  -          <pre>    
  -&lt;?xml version=&quot;1.0&quot; encoding=&quot;ISO-8859-1&quot;?&gt;
  +        <td bgcolor="#c0c0c0" width="532"> 
  +            <pre>    
  +[ snip! ]</pre> 
  +            <pre># Minimalistic Virtual Host configuration</pre> 
  +            <pre>&lt;VirtualHost 192.168.0.1&gt;
  +ServerName host1
  +DocumentRoot /web/host1/html
  +ApJServMount /servlet /ROOT
  +&lt;Directory &quot;/web/host1/html/WEB-INF&quot;&gt;
  +Options None
  +Deny from all
  +&lt;/Directory&gt;
  +&lt;/VirtualHost&gt;
   
  -&lt;Server&gt;
  -    &lt;!-- Debug low-level events in XmlMapper startup --&gt;
  -    &lt;xmlmapper:debug level=&quot;0&quot; /&gt;
  -
  -    &lt;!--  @@@
  -        Note, the log files are suffixed with _bill to distinguish
  -        them from the joe files. 
  -    --&gt;
  -
  -    &lt;Logger name=&quot;tc_log&quot; 
  -            path=&quot;logs/tomcat_bill.log&quot;
  -            customOutput=&quot;yes&quot; /&gt;
  -
  -    &lt;Logger name=&quot;servlet_log&quot; 
  -            path=&quot;logs/servlet_bill.log&quot;
  -            customOutput=&quot;yes&quot; /&gt;
  -
  -    &lt;Logger name=&quot;JASPER_LOG&quot; 
  -        path=&quot;logs/jasper_bill.log&quot;
  -            verbosityLevel = &quot;INFORMATION&quot; /&gt;
  -
  -    &lt;!--  @@@
  -        Note, the work directory is suffixed with _bill to distinguish
  -        it from the joe work directory.
  -    --&gt;
  -    &lt;ContextManager debug=&quot;0&quot; workDir=&quot;work_bill&quot; &gt;
  -        &lt;!-- Context level Setup --&gt;
  -        &lt;ContextInterceptor 
  -		    className=&quot;org.apache.tomcat.context.AutoSetup&quot; /&gt;
  -        &lt;ContextInterceptor 
  -		    className=&quot;org.apache.tomcat.context.DefaultCMSetter&quot; /&gt;
  -        &lt;ContextInterceptor 
  -		    className=&quot;org.apache.tomcat.context.WorkDirInterceptor&quot; /&gt;
  -        &lt;ContextInterceptor 
  -		    className=&quot;org.apache.tomcat.context.WebXmlReader&quot; /&gt;
  -        &lt;ContextInterceptor 
  -		    className=&quot;org.apache.tomcat.context.LoadOnStartupInterceptor&quot; /&gt;
  -        &lt;!-- Request processing --&gt;
  -        &lt;RequestInterceptor 
  -		    className=&quot;org.apache.tomcat.request.SimpleMapper&quot; debug=&quot;0&quot; /&gt;
  -        &lt;RequestInterceptor 
  -		    className=&quot;org.apache.tomcat.request.SessionInterceptor&quot; /&gt;
  -        &lt;RequestInterceptor 
  -		    className=&quot;org.apache.tomcat.request.SecurityCheck&quot; /&gt;
  -        &lt;RequestInterceptor 
  -		    className=&quot;org.apache.tomcat.request.FixHeaders&quot; /&gt;
  -
  -        &lt;!-- @@@ This connector uses port number 8009 for it's ajp communication --&gt;
  -        &lt;Connector className=&quot;org.apache.tomcat.service.SimpleTcpConnector&quot;&gt;
  -            &lt;Parameter 
  -                name=&quot;handler&quot; 
  -                value=&quot;org.apache.tomcat.service.connector.Ajp12ConnectionHandler&quot;/&gt;
  -            &lt;Parameter name=&quot;port&quot; value=&quot;8009&quot;/&gt;
  -        &lt;/Connector&gt;
  -
  -        &lt;!-- @@@ the /bill context --&gt;
  -        &lt;Context path=&quot;/bill&quot; docBase=&quot;webapps/bill&quot; debug=&quot;0&quot; reloadable=&quot;true&quot; &gt; 
  -        &lt;/Context&gt;
  -    &lt;/ContextManager&gt;
  -&lt;/Server&gt;       
  -          </pre> 
  +&lt;VirtualHost 192.168.0.1&gt;
  +ServerName host2
  +DocumentRoot /web/host2/html
  +ApJServMount /servlet /ROOT
  +&lt;Directory &quot;/web/host2/html/WEB-INF&quot;&gt;
  +Options None
  +Deny from all
  +&lt;/Directory&gt;
  +&lt;/VirtualHost&gt;</pre> 
  +            <pre>[ snip! ]
  +            </pre> 
           </td> 
         </tr> 
       </table>
  +    
       <p>
  -        The port configuration is not the only place where the joe and bill
  -        configuration differs. We have @@@ marks in the xml files marking
  -        the four places where changes had to be made. As you can see, this
  -        difference is necessary to avoid the two Tomcat processes from
  -		overwriting each other's logs and workspace.
  +        That's it!&nbsp; Place your servlets in the WEB-INF/classes directory
  +        for each virtual host, restart Tomcat and Apache, and you should be
  +        away.&nbsp; If not, be sure to check the <a href="#common_errors">Common
  +        Problems</a> section.
       </p>
  -    <p>
  -        Then we should start the two tomcat processes using the -f command
  -        line option:
  -        <div> bin\starup -f conf\server_joe.xml</div>
  -        <div> bin\starup -f conf\server_bill.xml</div>
  -        and then access them from Apache based on the different URL path
  -        prefixes.
   
  -    <h3> Configuring Virtual Hosting </h3>
  -    <p>
  -        It is possible to support virtual hosts under Tomcat Ver3.1, in fact
  -        the virtual host configuration is very similar to configuring for
  -        multiple JVM (as explained in the previous section) and the reason
  -        is simple; in Tomcat 3.1 each virtual host is implemented by a 
  -		different Tomcat process.
  -    </p>
  +    <hr size="5">
  +    <h3><a name="common_errors">Common Installation and Configuration Problems</a></h3>
  +    <blockquote>
  +      <p>This section isn't meant to be your one-stop shop for all troubles
  +      Tomcat-Apache, but a resource for stumbling blocks common to many first-time
  +      Tomcat'ers.&nbsp; See the <a href="uguide/tomcat_ug.html#where_help">help section</a>
  +      of the <a href="uguide/tomcat_ug.html">User's Guide</a> for
  +      additional links.</p>
  +      <p>One thing that many users don't recall is that there is a
  +      wealth of information to be found in the log files!&nbsp; Primarily, the tomcat.log
  +      file in your $TOMCAT_HOME/logs directory, or wherever you've configured
  +      it.&nbsp; If you want more detail, see the User's Guide for instructions
  +      on how to edit your server.xml to have more verbose logging.</p>
  +      <p>In addition, the web server adapter has a log file as well.&nbsp; It's
  +      usually &lt;adapter_name&gt;.log (e.g. mod_jserv.log).</p>
  +    <h4> <a name="error_8007">Requesting <b>http://webserver:8007/</b>
  +        produces an HTTP 500 error</a></h4>
  +      <blockquote>
  +        <p>If this occurs, you should see a stack trace in your tomcat.log file, starting with:</p>
  +      <blockquote>
  +        <p class="code"> HANDLER THREAD PROBLEM: java.io.IOException: Stream broken</p>
  +      </blockquote>
  +      <p>By default, Tomcat listens for AJP connections on port 8007.&nbsp; AJP
  +      is a protocol used to communicate between the web server and Tomcat, <b>not</b>
  +      Tomcat and your browser.&nbsp; Many first-time users mistakenly assume
  +      that this is how you test your Tomcat installation or Tomcat-Apache
  +      integration, while this is not the case.</p>
  +      </blockquote>
  +      <h4> <a name="error_no_apache">Apache doesn't start
  +      when Tomcat is running</a></h4>
  +      <blockquote>
  +      <p>This most likely means that Tomcat is trying to use a port that is
  +      already being used by someone else - usually Apache or another instance of
  +      Tomcat.&nbsp; By default, Tomcat's comes configured to run an HTTP server on port
  +      8080.&nbsp; If you examine the supplied server.xml file, you'll see the
  +      following element:</p>
  +      <blockquote>
  +      <p class="code">        &lt;!-- Normal HTTP --><br>
  +        &lt;Connector className=&quot;org.apache.tomcat.service.PoolTcpConnector&quot;&gt;<br>
  +      &nbsp;&nbsp;&nbsp; &lt;Parameter name="handler"&nbsp;<br>
  +      &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; value=&quot;org.apache.tomcat.service.http.HttpConnectionHandler&quot;/&gt;<br>
  +      &nbsp;&nbsp;&nbsp; &lt;Parameter name="port"&nbsp;<br>
  +      &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; value="8080"/><br>
  +        &lt;/Connector></p>
  +      </blockquote>
  +      <p>To disable this, just comment out the entire &lt;Connector&gt;
  +      element.&nbsp; Otherwise, just change it to a port that doesn't conflict
  +      with Apache.&nbsp; If you're not going to use the Tomcat HTTP server, and
  +      you probably won't be if you are reading this document, disable it.</p>
  +      <p>If you're running Apache / JServ, JServ may be clashing with Tomcat on
  +      port 8007 as well.</p>
  +      </blockquote>
   
  -    <p>
  -        With the current (Ver3.1) Tomcat, virtual hosting awareness is
  -        provided by the web server (Apache/Netscape…). The web server
  -        virtual hosting support is used by the Tomcat adapter to
  -        redirect requests belonging to a certain virtual host to the JVM(s)
  -        containing the contexts of this virtual host. This means that if (for
  -        example) we have two virtual hosts (vhost1 and vhost2), we will have
  -        two JVMs: one running the contexts of vhost1 and the other running
  -        the contexts of vhost2. These JVMs are not aware of each others 
  -		existence, in fact, they are not aware of the concept of virtual 
  -		hosting. All the virtual hosting logic is inside the web-server 
  -		adapter. To make things clearer, lets look at the following sample 
  -		Apache-Tomcat configuration file:
  -    </p>
  +      <h4><a name="error_same_machine">Can I run both Apache/JServ and
  +      Apache/Tomcat on the same machine?</a></h4>
  +      <blockquote>
  +      <p>Apparently you can, but you'll need to use mod_jserv rather than mod_jk.&nbsp;
  +      As of Tomcat 3.2b2, the mod_jserv.so is the same as that used by
  +      Apache/JServ.&nbsp; You will need to run Apache/JServ on a different port
  +      to Tomcat, then you can control which servlet engine/container handles
  +      which requests by specifying the appropriate port via the ApJServMount
  +      directive in Apache's httpd.conf.</p>
  +      </blockquote>
   
  -    <p>
  +    <h4> <a name="error_ignore_directives">&lt;Directory&gt;
  +    and &lt;Location&gt; directives ignored</a></h4>
  +      <blockquote>
  +      <p>Apache forwards all requests underneath a mounting to Tomcat.&nbsp;
  +      Let's say you had the following at the root-level of your httpd.conf
  +      file.&nbsp; You're thinking, &quot;I'll forward all JSP and Servlet
  +      requests to Tomcat&quot;.&nbsp; What Apache thinks is, &quot;I'll forward
  +      EVERYTHING to Tomcat&quot;:</p>
  +      <blockquote>
  +
       <table border="1"
           cellspacing="0"
           cellpadding="0"     
  -        valign="middle">
  +        valign="middle" width="536">
         <caption valign="bottom" width="100%"> 
  -        <em> Apache-Tomcat Configuration with Virtual Hosts Support </em>
  +        <em>Counter-intuitive Tomcat-Apache configuration</em>
         </caption>
         <tr> 
  -        <td bgcolor="#c0c0c0"> 
  +        <td bgcolor="#c0c0c0" width="532"> 
               <pre>    
  -######################################################################
  -#        Apache Tomcat Virtual Hosts Sample Configuration            #
  -######################################################################
  -LoadModule jserv_module modules/ApacheModuleJServ.dll
  -&lt;IfModule mod_jserv.c&gt;
  -ApJServManual on
  -ApJServDefaultProtocol ajpv12
  -ApJServSecretKey DISABLED
  -ApJServMountCopy on
  -ApJServLogLevel notice
  -
  -ApJServDefaultHost localhost
  -ApJServDefaultPort 8007
  -
  -# 1 Creating an Apache virtual host configuration
  -NameVirtualHost 9.148.16.139
  +[ snip! ]</pre> 
  +            <pre># OOPS! - Forward everything to Tomcat
  +ApJServMount / ajpv12://myTomcatHost:1234/blah</pre> 
  +            <pre># Do not show directory indicies
  +&lt;Directory &quot;/home/myApp&quot;&gt;
  +	AllowOverride AuthConfig
  +	Options -Indexes
  +&lt;/Directory&gt;
   
  -# 2 Mounting the first virtual host
  -&lt;VirtualHost 9.148.16.139&gt;
  -ServerName www.vhost1.com
  -ApJServMount /examples ajpv12://localhost:8007/examples
  -&lt;/VirtualHost&gt;
  +# Block WEB-INF from all viewing
  +&lt;Location &quot;/home/myApp/WEB-INF/&quot;&gt;
  +	AllowOverride None
  +	deny from all
  +&lt;/Location&gt;
   
  -# 3 Mounting the second virtual host
  -&lt;VirtualHost 9.148.16.139&gt;
  -ServerName www.vhost2.com
  -ApJServMount /examples ajpv12://localhost:8009/examples
  -&lt;/VirtualHost&gt;
  -&lt;/IfModule&gt;
  +[ snip! ]
               </pre> 
           </td> 
         </tr> 
       </table>
       
  -    <p>
  -        As can be seen, steps 1,2 and 3 define two Apache virtual hosts and 
  -        for each of them, mount the /examples context to a certain ajpv12 URL. 
  -        Each such ajpv12 URL points to a JVM that contains the virtual host. 
  -        The configuration of the two JVMs is very similar to the one
  -        demonstrated in the previous section, we will need again to use two 
  -        different server.xml files (one for each virtual host process) and
  -        we will need to start the Tomcat processes with the -f command line 
  -        option. After doing that we will be able to approach Apache, each
  -        time with a different host name, and the adapter will redirect us to 
  -        the appropriate JVM.
  -    </p>
  -    <p>
  -        <strong><u>The need for improved virtual host support</u></strong><br>
  -        Having each virtual host implemented by a different JVM is a huge 
  -        scalability problem. The next versions of Tomcat will make it 
  -        possible to support several virtual hosts within the same Tomcat 
  -        JVM.
  -    </p>
  +      </blockquote>
  +      <p><br>
  +      What's happened here is that the first ApJServMount is saying,
  +      &quot;Anything under the root '/' should be forwarded to the following
  +      Tomcat process/path for handling.&quot;&nbsp; This results in requests for
  +      static documents being forwarded as well, which isn't what we want.&nbsp;
  +      If I was told to 'fix' the above conf file, I would just change the '/'
  +      after ApJServMount to &quot;/servlet&quot;.&nbsp; You would have
  +      already defined earlier up that all JSP requests go to the jserv-servlet
  +      handler (see our <a href="#httpd_jserv">Apache-mod_jserv</a> configuration
  +      section).
  +        </p>
  +      </blockquote>
  +      <h4><a name="error_ssl_ie">mod_ssl - pages sometimes don't finish loading
  +      using Internet Explorer</a>
  +        </h4>
  +      <blockquote>
  +        <p>Tomcat sends data back to the browser using the Transfer-Encoding:
  +        Chunked method.&nbsp; This causes problems with Internet Explorer when
  +        using SSL.&nbsp; The solution is to make sure the first line of the
  +        returned file isn't blank.
  +        </p>
  +      </blockquote>
  +      <h4><a name="error_ssl_http">mod_ssl - getScheme() always returns HTTP!</a>
  +        </h4>
  +      <blockquote>
  +        <p>The protocol used by mod_jserv can't identify whether a page was
  +        requested via HTTP or HTTPS.&nbsp; Yes, Apache/JServ did it, but that
  +        was a hack (just checked for requests on port 443).&nbsp; The solution
  +        is either to check for port 443 yourself, or to upgrade to mod_jk and
  +        the ajpv13 protocol.&nbsp; Another symptom of this is finding requests
  +        redirected to <a href="http://yourserver.com:443">http://yourserver.com:443</a>
  +        rather than <a href="https://yourserver.com/">https://yourserver.com/</a>.
  +        </p>
  +      </blockquote>
  +      <h4><a name="error_migrating_jhtml">Migrating from Apache/JServ JSSI&nbsp;
  +      to Apache/Tomcat</a>
  +        </h4>
  +      <blockquote>
  +      <p>Tomcat doesn't support JSSI Until someone writes an Interceptor to
  +      handle them, the easiest way is to convert your .jhtml files to .jsp
  +      files.&nbsp; Just replace:
  +        </p>
  +        <font SIZE="2">
  +        <blockquote>
  +          <p class="code">&lt;servlet name=myServlet&gt;<br>
  +          &nbsp;&nbsp;&nbsp; &lt;param name=aParam value=aValue&gt;<br>
  +          &lt;/servlet&gt;</p>
  +        </blockquote>
  +        </font>
  +      <p>with
  +        </p>
  +        <font SIZE="2">
  +        <blockquote>
  +          <p class="code">&lt;jsp:include page=&quot;/servlet/myServlet&quot;
  +          flush=&quot;true&quot; &gt;<br>
  +          &nbsp;&nbsp;&nbsp;</font> <font SIZE="2">&lt;jsp:param name=&quot;aParam&quot;
  +          value=&quot;aValue&quot; /&gt;<br>
  +          &lt;/jsp:include&gt;</p>
  +        </blockquote>
  +        </font>
  +      </blockquote>
  +      <h4><a name="error_rewrite_usedto">mod_rewrite - Used to work fine with
  +      Apache/JServ, what gives?</a>
  +        </h4>
  +      <blockquote>
  +      <p>Tomcat implements the servlet specification v2.2, whereas JServ
  +      implemented version 2.1.&nbsp; In the newer version, there are tighter
  +      restrictions on the mapping from URL (what the user requests) to the
  +      filename (what they get).&nbsp; Specifically, it insists that:
  +        </p>
  +        <blockquote>
  +      <p class="code">request URI = context path + servlet path + path info
  +        </p>
  +        </blockquote>
  +      <p>This means that the arbitrary mappings that mod_rewrite is capable of
  +      simply won't work without breaking the Servlet specification.&nbsp; One
  +      solutions is to use the [R] flag on the RewriteRule directive to
  +      &quot;externally redirect&quot; the request.
  +        </p>
  +      </blockquote>
  +      <h4><a name="error_no_requests">Tomcat isn't receiving requests under
  +      /servlet</a>
  +        </h4>
  +      <blockquote>
  +      <p>If you have a &quot;&lt;Location /&gt;&quot; directive in your
  +      httpd.conf file, this will take precedence over any ApJServMount
  +      directives.&nbsp; The following example won't forward &quot;/servlet&quot;
  +      requests to Tomcat.
  +        </p>
  +        <blockquote>
  +      <p class="code">ApJServMount /servlet /ROOT<br>
  +      &lt;Location /&gt;<br>
  +      Options Indexes Multiviews<br>
  +      &lt;/Location&gt;
  +        </p>
  +        </blockquote>
  +      <p>A workaround is to use &lt;Directory&gt; instead of &lt;Location&gt;
  +        </p>
  +      </blockquote>
  +      <h4><a name="error_start_nobody">How do I get Tomcat to start
  +      automatically as &quot;nobody&quot;?</a></h4>
  +      <blockquote>
  +      <p>If your UNIX-style box has an &quot;rc.d&quot;-style boot directory
  +      (Solaris, RedHat, etc.), then the simplest way is to create a file in the
  +      appropriate boot directory which looks something like this:
  +        </p>
  +        <blockquote>
  +          <p class="code">#!/bin/sh<br>
  +          CLASSPATH=/your/classpath/here<br>
  +          export CLASSPATH<br>
  +          su - nobody -c &quot;/tomcat/bin/tomcat.sh $@&quot;
  +        </p>
  +        </blockquote>
  +      <p>You can then invoke this as /etc/rc.d/init.d/tomcat (start | stop) from
  +      your boot sequence in the same way that you start Apache (for instance).
  +        </p>
  +      </blockquote>
  +      <h4><a name="error_jk_where">mod_jk - I want to use it, but I can't find
  +      it.&nbsp; Where is it?</a>
  +        </h4>
  +      <blockquote>
  +      <p>As of this writing (Sept. 30, 2000) mod_jk has to be built from the
  +      Tomcat source distibution.
  +        </p>
  +      </blockquote>
  +      <h4><a name="error_jk_apache_lock">mod_jk - Apache locks up when
  +      requesting a Servlet or JSP</a>
  +        </h4>
  +      <blockquote>
  +      <p>mod_jk reuses the same port when talking to Tomcat, unlike mod_jserv.&nbsp;
  +      You'll need to restart Apache whenever you restart Tomcat.
  +        </p>
  +      </blockquote>
  +    </blockquote>
   
  -    <a name="credits">
  -    <h2>Credits</h2>
  -
  -    <p> This document was created by 
  -    <a href="mailto:shachor@il.ibm.com"> Gal Shachor</a>. It was split
  -      off into a separate document and revised by Alex Chaffee and Rob
  -      Slifka.
  -    </ul>
  -    With help from (in alphabetical order):
  +    <hr size="5">
  +    <h2><a name="credits">Credits</a></h2>
  +
  +    <p> This document was created by
  +    <a href="mailto:shachor@il.ibm.com"> Gal Shachor</a>.&nbsp; It was split
  +      off into a separate document and revised by Rob Slifka and Mike Bremford.&nbsp;
  +    Contributors, listed in alphabetical order:
       <ul>
        Jonathan Bnayahu<br>
  +     Mike Bremford<br>
        Alex Chaffee<br>
        Fiona Czuczman<br>
        Costin Manolache<br>
  +     Craig R. McClanahan<br>
        Rob Slifka<br>
  +     ...the countless many on the tomcat-dev and tomcat-user lists!
       </ul>
  -    </p>
   
       <table width="100%" border="0" cellpadding="10" cellspacing="0">
         <tr>
           <td>
             <p class="fineprint">
  -            Copyright &copy;1999 The Apache Software Foundation<br>
  +            Copyright &copy;1999-2000 The Apache Software Foundation<br>
               <a href="http://jakarta.apache.org/legal.html">Legal Stuff They Make Us Say</a><br>
               <a href="http://jakarta.apache.org/contact.html">Contact Information</a> </p>
           </td>
  
  
  
  No                   revision
  
  
  No                   revision
  
  
  1.8.2.2   +13 -10    jakarta-tomcat/src/doc/uguide/Attic/tomcat_ug.html
  
  Index: tomcat_ug.html
  ===================================================================
  RCS file: /home/cvs/jakarta-tomcat/src/doc/uguide/Attic/tomcat_ug.html,v
  retrieving revision 1.8.2.1
  retrieving revision 1.8.2.2
  diff -u -r1.8.2.1 -r1.8.2.2
  --- tomcat_ug.html	2000/10/03 04:56:02	1.8.2.1
  +++ tomcat_ug.html	2000/10/03 06:15:48	1.8.2.2
  @@ -1,7 +1,7 @@
   
   <html>
     <head>
  -    <!-- $Id: tomcat_ug.html,v 1.8.2.1 2000/10/03 04:56:02 larryi Exp $ -->
  +    <!-- $Id: tomcat_ug.html,v 1.8.2.2 2000/10/03 06:15:48 larryi Exp $ -->
       <!-- Copyright 1999, Apache Software Foundation -->
       <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
       <link rel="stylesheet" href=style.css>
  @@ -11,10 +11,10 @@
     </head>
     <body link="#0000ff" vlink="#800080">
       <!-- Banner element, all hail the Project! -->
  -    <table border="0">
  +    <table border="0" width="100%" cellspacing="0" cellpadding="0">
         <tr>
  -        <td>
  -          <p>
  +        <td width="50%">
  +          <p align="left">
               <a href="http://jakarta.apache.org/index.html">
                 <img src=images/banner.gif 
                      width="350" 
  @@ -24,6 +24,9 @@
               </a>
             </p>
           </td>
  +        <td width="50%">
  +          <p align="right"><img border="0" src="images/tomcat.gif" width="100" height="71" alt="The mighty Tomcat - Meow!"></p>
  +        </td>
         </tr>
       </table>
       
  @@ -42,7 +45,7 @@
       </ol>
   
       Hopefully this should be enough for any new user to get started
  -    with Tomcat. If something is missing then try (in this order):</p>
  +    with Tomcat. <a name="where_help">If something is missing then try (in this order):</a></p>
       <ol>
         <li>Search the Tomcat <a href="http://jakarta.apache.org/jyve-faq/Turbine/screen/MainMenu/faq_id/12/project_id/2/screen/DisplayTopics/action/SetAll">faq</a>.</li>      
         <li>Search the Tomcat list <a href="http://www.metronet.com/~wjm/tomcat/">archive</a>. </li>
  @@ -57,7 +60,7 @@
         <a href="http://jakarta.apache.org/getinvolved/mail.html">mailing lists</a>.
       </p>
       
  -    <h2>Getting Started</h2>
  +    <h2><a name="container_types">Getting Started</a></h2>
       <p>  
           Tomcat is a servlet container with a JSP environment.
           A servlet container is a runtime shell that manages and invokes 
  @@ -65,7 +68,7 @@
       
       <p>You can roughly partition servlet containers into:</p>
       <ol>
  -      <li><strong><u>Stand-alone servlet containers</u></strong><br>
  +      <li><a name="type_1"><strong><u>Stand-alone servlet containers</u></strong></a><br>
           These are an integral part of the web server. This
           is the case when using a Java-based web server, for example the
           servlet container that is part of the JavaWebServer. Stand-alone
  @@ -386,7 +389,7 @@
       cover the content of server.xml and discuss the usage of web.xml in the context of Tomcat.
     </p>
   
  -    <h3> server.xml </h3>
  +    <h3><a name="server_xml"> server.xml </a></h3>
       <p> server.xml is Tomcat's main configuration file. It serves two goals:
       <ol>
         <li> Providing initial configuration for the Tomcat components. </li>
  @@ -509,7 +512,7 @@
       <p>If the ContextManager.home property in server.xml is relative, it
          will be relative to the current working directory.</p>
   
  -    <h3> web.xml </h3>
  +    <h3><a name="web_xml"> web.xml </a></h3>
       <p>
         A detailed description of web.xml and the web application structure
         (including directory structure and configuration) is available in
  @@ -758,7 +761,7 @@
         system (don't panic, it is not that hard!).
       </p>
       <p>
  -      Building mod_jserv on <b>UNIX</b> involves the following:
  +      <a name="jserv_build">Building mod_jserv</a> on <b>UNIX</b> involves the following:
       <ol>
         <li> Download the source distribution of Tomcat from
       <a href="http://jakarta.apache.org/downloads/sourceindex.html"> here</a>. </li>
  
  
  
  No                   revision
  
  
  No                   revision
  
  
  1.1.2.1   +20 -0     jakarta-tomcat/src/doc/uguide/images/Attic/tomcat.gif
  
  	<<Binary file>>
  
  

Mime
View raw message