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 tomcat_ug.html
Date Tue, 03 Oct 2000 04:56:03 GMT
larryi      00/10/02 21:56:03

  Modified:    src/doc/uguide Tag: tomcat_32 tomcat_ug.html
  Log:
  Made a pass at updating for Tomcat 3.2.
  
  Revision  Changes    Path
  No                   revision
  
  
  No                   revision
  
  
  1.8.2.1   +82 -96    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
  retrieving revision 1.8.2.1
  diff -u -r1.8 -r1.8.2.1
  --- tomcat_ug.html	2000/06/15 19:02:40	1.8
  +++ tomcat_ug.html	2000/10/03 04:56:02	1.8.2.1
  @@ -1,7 +1,7 @@
   
   <html>
     <head>
  -    <!-- $Id: tomcat_ug.html,v 1.8 2000/06/15 19:02:40 ed Exp $ -->
  +    <!-- $Id: tomcat_ug.html,v 1.8.2.1 2000/10/03 04:56:02 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>
  @@ -317,8 +317,8 @@
                 
               <li>A path to the server.xml used by this Tomcat process. </li>
             </ol>
  -          <p>For example if server.xml is located in /etc/server_1.xml and
  -             the user wants to start apache in the background they should 
  +          <p>For example, if server.xml is located in /etc/server_1.xml and
  +             the user wants to start Tomcat in the background, they should 
                provide the following command line: 
                <div>bin/tomcat.sh start -f /etc/server_1.xml</div></p>
              </li>
  @@ -329,16 +329,23 @@
       <td> Win32 </td>
       <td>
         <ul>
  +        <li>Saves current TOMCAT_HOME and CLASSPATH settings.</li>
  +        <li>Tests JAVA_HOME to insure it is set.</li>
  +        <li>Tests if TOMCAT_HOME is set and defaults it to "." if not set.
  +        Then TOMCAT_HOME is used to test the existence of servlet.jar to insure
  +        TOMCAT_HOME is valid.</li>
           <li>Setting up a CLASSPATH that contains -
             
             <ol>
  -            <li> servlet.jar, webserver.jar, jasper.jar, xml.jar from the
  -                %TOMCAT_HOME%\lib directory, </li>
               <li> %TOMCAT_HOME%\classes (even if does not exist), </li>
  -            <li> %JAVA_HOME%\lib\tools.jar (this jar file contains the tool
  +            <li> Jar files from %TOMCAT_HOME%\lib.  If possible, all jar files in
  +            %TOMCAT_HOME%\lib are dynamically included.  If not possible, the
  +            following jar files are included statically: ant.jar, jasper.jar,
  +            jaxp.jar, parser.jar, servlet.jar, webserver.jar</li>
  +            <li> %JAVA_HOME%\lib\tools.jar, if it exists (this jar file contains
the tool
                    javac, we need javac for jsp files).</li>
            </ol>
  -        <li>Executes java, assuming that it is in the PATH, with command line
  +        <li>Executes %JAVA_HOME%\bin\java, with command line
           parameters that set up a java system environment, called tomcat.home,
           with org.apache.tomcat.startup.Tomcat as the startup class. It also
           passes command line parameters to org.apache.tomcat.startup.Tomcat,
  @@ -349,19 +356,23 @@
   
               <li>A path to the server.xml used by this Tomcat process. </li>
           </ol>
  -        <p>For example if server.xml is located in conf\server_1.xml and
  -           the user wants to start apache in the background they should 
  +        <p>For example, if server.xml is located in conf\server_1.xml and
  +           the user wants to start Tomcat in a new window, they should 
              provide the following command line: 
  -           <div>bin\tomcat.bar start -f conf\server_1.xml</div></p>
  +           <div>bin\tomcat.bat start -f conf\server_1.xml</div></p>
   
  -        </li></ul>
  +        </li>
  +        <li>Restores previously saved TOMCAT_HOME and CLASSPATH settings.</li></ul>
           </td>
         </tr>
       </table>
   
  -    <p>As you can see, the Win32 version of tomcat.bat pales compared to the Unix
  -      one. Especially it does not guess the values of TOMCAT_HOME and
  -      JAVA_HOME and it also doesn't take all the jar files into the classpath.</p>
  +    <p>As you can see, the Win32 version of tomcat.bat is not as robust as the Unix
  +      one. Especially, it does not guess the values of JAVA_HOME and only tries
  +      "." as a quess for TOMCAT_HOME.  It can build CLASSPATH dynamically, but
  +      not in all cases.  It can not build CLASSPATH dynamically if TOMCAT_HOME
  +      contains spaces, or on Win9x, if TOMCAT_HOME contains non-8.3 directory
  +      names.</p>
   
       <h2> Tomcat's Configuration Files </h2>
       <p> Tomcat's configuration is based on two files:
  @@ -416,6 +427,8 @@
   				 TOMCAT_HOME.
               </li>
               <li> The name of the working directory. </li>
  +            <li> A flag to control whether stack traces and other debug information
  +              is included in the default responses.</li>
             </ol>
           </td>
         </tr>
  @@ -471,8 +484,8 @@
         </ol>
       </td>
         </tr>
  -    </table>
  -
  +    </table><br>
  +    Additional information may be found within the server.xml file.
       </p>
       <h3> Starting Tomcat From Another Directory </h3>
       
  @@ -485,7 +498,7 @@
           <ul>
             <li>A webapps/ directory (if you created one) - all war files will
                 be expanded and all subdirectories added as contexts.</li>
  -          <li>conf/ directory - you can store a special web.xml and other
  +          <li>conf/ directory - you can store tomcat-users.xml and other
                 configuration files.</li>
             <li>logs/ - all logs will go to this directory instead of the main
                 TOMCAT_HOME/logs/.</li>
  @@ -604,7 +617,7 @@
         you add a new context.
       </p>
       <p>
  -      <b>Tomcat 3.1:</b> you must restart tomcat and apache after adding
  +      <b>Tomcat:</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 
  @@ -771,6 +784,11 @@
         <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> Set an environment variable called APACHE_SRC which points to the Apache
  +        source directory, i.e. SET APACHE_SRC=C:\Program Files\Apache Group\Apache\src.
  +        Note that the make file expects to link to "CoreR\ApacheCore.lib" under
  +        the APACHE_SRC directory.  See the Apache documentation for building
  +        ApacheCore.</li>
         <li> Execute the build command <div><tt> nmake -f Makefile.win32
</tt></div>
           nmake is the Visual C++ make program.</li>
       </ul>
  @@ -1043,35 +1061,24 @@
           it from the bill work directory.
       --&gt;
       &lt;ContextManager debug="0" workDir="work_joe" &gt;
  -        &lt;!-- Context level Setup --&gt;	
  -        &lt;ContextInterceptor 
  -		    className="org.apache.tomcat.context.AutoSetup" /&gt;
  -        &lt;ContextInterceptor 
  -		    className="org.apache.tomcat.context.DefaultCMSetter" /&gt;
  -        &lt;ContextInterceptor 
  -		    className="org.apache.tomcat.context.WorkDirInterceptor" /&gt;
  -        &lt;ContextInterceptor 
  -		    className="org.apache.tomcat.context.WebXmlReader" /&gt;
  -        &lt;ContextInterceptor 
  -		    className="org.apache.tomcat.context.LoadOnStartupInterceptor" /&gt;
  -        &lt;!-- Request processing --&gt;
  -        &lt;RequestInterceptor 
  -		    className="org.apache.tomcat.request.SimpleMapper" debug="0" /&gt;
  -        &lt;RequestInterceptor 
  -		    className="org.apache.tomcat.request.SessionInterceptor" /&gt;
  -        &lt;RequestInterceptor 
  -		    className="org.apache.tomcat.request.SecurityCheck" /&gt;
  -        &lt;RequestInterceptor 
  -		    className="org.apache.tomcat.request.FixHeaders" /&gt;
  +        &lt;!-- ==================== Interceptors ==================== --&gt;
  +
  +        ...
  +        
  +        &lt;!-- ==================== Connectors ==================== --&gt;
   
  +        ...
  +
  +        &lt;!-- Apache AJP12 support. This is also used to shut down tomcat.
  +          --&gt;
           &lt;!-- @@@ This connector uses port number 8007 for it's ajp communication
--&gt;
  -        &lt;Connector 
  -		    className="org.apache.tomcat.service.SimpleTcpConnector"&gt;
  -            &lt;Parameter 
  -                name="handler" 
  -                value="org.apache.tomcat.service.connector.Ajp12ConnectionHandler"/&gt;
  +        &lt;Connector className="org.apache.tomcat.service.PoolTcpConnector"&gt;
  +            &lt;Parameter name="handler" 
  +       value="org.apache.tomcat.service.connector.Ajp12ConnectionHandler"/&gt;
               &lt;Parameter name="port" value="8007"/&gt;
           &lt;/Connector&gt;
  +        
  +        &lt;!-- ==================== Special webapps ==================== --&gt;
   
           &lt;!-- @@@ the /jow context --&gt;
           &lt;Context path="/joe" docBase="webapps/joe" debug="0" reloadable="true" &gt;

  @@ -1126,35 +1133,26 @@
           it from the joe work directory.
       --&gt;
       &lt;ContextManager debug="0" workDir="work_bill" &gt;
  -        &lt;!-- Context level Setup --&gt;
  -        &lt;ContextInterceptor 
  -		    className="org.apache.tomcat.context.AutoSetup" /&gt;
  -        &lt;ContextInterceptor 
  -		    className="org.apache.tomcat.context.DefaultCMSetter" /&gt;
  -        &lt;ContextInterceptor 
  -		    className="org.apache.tomcat.context.WorkDirInterceptor" /&gt;
  -        &lt;ContextInterceptor 
  -		    className="org.apache.tomcat.context.WebXmlReader" /&gt;
  -        &lt;ContextInterceptor 
  -		    className="org.apache.tomcat.context.LoadOnStartupInterceptor" /&gt;
  -        &lt;!-- Request processing --&gt;
  -        &lt;RequestInterceptor 
  -		    className="org.apache.tomcat.request.SimpleMapper" debug="0" /&gt;
  -        &lt;RequestInterceptor 
  -		    className="org.apache.tomcat.request.SessionInterceptor" /&gt;
  -        &lt;RequestInterceptor 
  -		    className="org.apache.tomcat.request.SecurityCheck" /&gt;
  -        &lt;RequestInterceptor 
  -		    className="org.apache.tomcat.request.FixHeaders" /&gt;
   
  +        &lt;!-- ==================== Interceptors ==================== --&gt;
  +
  +        ...
  +        
  +        &lt;!-- ==================== Connectors ==================== --&gt;
  +
  +        ...
  +
  +        &lt;!-- Apache AJP12 support. This is also used to shut down tomcat.
  +          --&gt;
           &lt;!-- @@@ This connector uses port number 8009 for it's ajp communication
--&gt;
  -        &lt;Connector className="org.apache.tomcat.service.SimpleTcpConnector"&gt;
  -            &lt;Parameter 
  -                name="handler" 
  -                value="org.apache.tomcat.service.connector.Ajp12ConnectionHandler"/&gt;
  +        &lt;Connector className="org.apache.tomcat.service.PoolTcpConnector"&gt;
  +            &lt;Parameter name="handler" 
  +       value="org.apache.tomcat.service.connector.Ajp12ConnectionHandler"/&gt;
               &lt;Parameter name="port" value="8009"/&gt;
           &lt;/Connector&gt;
  -
  +        
  +        &lt;!-- ==================== Special webapps ==================== --&gt;
  +    
           &lt;!-- @@@ the /bill context --&gt;
           &lt;Context path="/bill" docBase="webapps/bill" debug="0" reloadable="true"
&gt; 
           &lt;/Context&gt;
  @@ -1182,15 +1180,15 @@
   
       <h3> Configuring Virtual Hosting </h3>
       <p>
  -        It is possible to support virtual hosts under Tomcat Ver3.1, in fact
  +        It is possible to support virtual hosts under Tomcat Ver3.2, 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 
  +        is simple; in Tomcat 3.2 each virtual host is implemented by a 
   		different Tomcat process.
       </p>
   
       <p>
  -        With the current (Ver3.1) Tomcat, virtual hosting awareness is
  +        With the current (Ver3.2) 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)
  @@ -1365,22 +1363,18 @@
               <td bgcolor="#c0c0c0">
                   <pre>
           &lt;!-- (1) HTTP Connector for stand-alone operation --&gt;
  -        &lt;Connector className="org.apache.tomcat.service.SimpleTcpConnector"&gt;
  -            &lt;Parameter
  -                name="handler"
  +        &lt;Connector className="org.apache.tomcat.service.PoolTcpConnector"&gt;
  +            &lt;Parameter name="handler"
                   value="org.apache.tomcat.service.http.HttpConnectionHandler"/&gt;
  -            &lt;Parameter
  -                name="port"
  +            &lt;Parameter name="port"
                   value="8080"/&gt;
           &lt;/Connector&gt;
   
           &lt;!-- (2) AJPV12 Connector for out-of-process operation --&gt;
  -        &lt;Connector className="org.apache.tomcat.service.SimpleTcpConnector"&gt;
  -            &lt;Parameter
  -                name="handler"
  +        &lt;Connector className="org.apache.tomcat.service.PoolTcpConnector"&gt;
  +            &lt;Parameter name="handler"
                   value="org.apache.tomcat.service.connector.Ajp12ConnectionHandler"/&gt;
  -            &lt;Parameter
  -                name="port"
  +            &lt;Parameter name="port"
                   value="8007"/&gt;
           &lt;/Connector&gt;
                   </pre>
  @@ -1398,16 +1392,15 @@
                    integration (out-of-process servlet integration).
           </ol>
   
  -        It is clear that a sane Tomcat deployment will use either an
  -        out-of-process servlet integration or a stand-alone operation,
  -        removing the unnecessary Connector is important.
  +        The AJPV12 Connector is required for Tomcat shutdown.  However, the
  +        HTTP Connector may be removed if stand-alone operation is not needed.
       </p>
       <h3> Use a Thread Pool in your Connectors </h3>
       <p>
           Tomcat is a multi-threaded servlet container this means that each
  -        request needs to be executed by some thread. By default when a
  -        request arrives Tomcat creates a new thread, starts it and has it
  -        serve the request. This behavior is problematic for loaded sites
  +        request needs to be executed by some thread. Prior to Tomcat 3.2, the
  +        default was to create a new thread to serve each request that arrives.
  +        This behavior is problematic for loaded sites
           because:
           <ul>
               <li>Starting and stopping a thread  for every request puts a
  @@ -1420,7 +1413,8 @@
                   Descriptors...) than it should and it can lead to low
                   performance and even crashes if resources are exhausted. </li>
           </ul>
  -        The solution for these problems is to use a <b>thread pool</b>.
  +        The solution for these problems is to use a <b>thread pool</b>, which
  +        is the default for Tomcat 3.2.
           Servlet containers that are using a thread pool relieve themselves
           from directly managing their threads. Instead of allocating new
           threads; whenever they need a thread they ask for it from the pool,
  @@ -1564,14 +1558,6 @@
       <p>
           So, unless you have a real need for class reloading during your
           deployment you should turn off the reloadable flag in your contexts.
  -    </p>
  -
  -    <h3> Start Tomcat from /etc/inittab </h3>
  -    <p>
  -        Unfortunately the adapters developed for Apache (or for any of the
  -        other servers) cannot start Tomcat yet. On UNIX however, you can
  -        use the init table to start Tomcat automatically upon machine
  -        startup. FIXME:
       </p>
   
       <h2>Authors</h2>
  
  
  

Mime
View raw message