266 lines
15 KiB
HTML
266 lines
15 KiB
HTML
<?xml version="1.0" encoding="UTF-8"?>
|
|
<!DOCTYPE html
|
|
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
|
<html lang="en-us" xml:lang="en-us">
|
|
<head>
|
|
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
|
<meta name="security" content="public" />
|
|
<meta name="Robots" content="index,follow" />
|
|
<meta http-equiv="PICS-Label" content='(PICS-1.1 "http://www.icra.org/ratingsv02.html" l gen true r (cz 1 lz 1 nz 1 oz 1 vz 1) "http://www.rsac.org/ratingsv01.html" l gen true r (n 0 s 0 v 0 l 0) "http://www.classify.org/safesurf/" l gen true r (SS~~000 1))' />
|
|
<meta name="DC.Type" content="topic" />
|
|
<meta name="DC.Title" content="About Tomcat" />
|
|
<meta name="abstract" content="This topic provides information about the Apache Software Foundation Jakarta Tomcat servlet engine." />
|
|
<meta name="description" content="This topic provides information about the Apache Software Foundation Jakarta Tomcat servlet engine." />
|
|
<meta name="DC.Relation" scheme="URI" content="rzaieconcepts.htm" />
|
|
<meta name="copyright" content="(C) Copyright IBM Corporation 2002,2006" />
|
|
<meta name="DC.Rights.Owner" content="(C) Copyright IBM Corporation 2002,2006" />
|
|
<meta name="DC.Format" content="XHTML" />
|
|
<meta name="DC.Identifier" content="rzaietomcat" />
|
|
<meta name="DC.Language" content="en-us" />
|
|
<!-- All rights reserved. Licensed Materials Property of IBM -->
|
|
<!-- US Government Users Restricted Rights -->
|
|
<!-- Use, duplication or disclosure restricted by -->
|
|
<!-- GSA ADP Schedule Contract with IBM Corp. -->
|
|
<link rel="stylesheet" type="text/css" href="./ibmdita.css" />
|
|
<link rel="stylesheet" type="text/css" href="./ic.css" />
|
|
<title>About Tomcat</title>
|
|
</head>
|
|
<body id="rzaietomcat"><a name="rzaietomcat"><!-- --></a>
|
|
<!-- Java sync-link --><script language="Javascript" src="../rzahg/synch.js" type="text/javascript"></script>
|
|
<h1 class="topictitle1"><span>About Tomcat</span></h1>
|
|
<div><p>This topic provides information about the Apache Software Foundation
|
|
Jakarta Tomcat servlet engine.</p>
|
|
<div class="important"><span class="importanttitle">Important:</span> Information
|
|
for this topic supports the latest PTF levels for HTTP Server for i5/OS .
|
|
It is recommended that you install the latest PTFs to upgrade to the latest
|
|
level of the HTTP Server for i5/OS. Some of the topics documented here are
|
|
not available prior to this update. See <a href="http://www-03.ibm.com/servers/eserver/iseries/software/http/services/service.html" target="_blank">http://www.ibm.com/servers/eserver/iseries/software/http/services/service.htm</a> <img src="www.gif" alt="Link outside Information Center" /> for more information. </div>
|
|
<p>The iSeries™ implementation
|
|
of Apache Software Foundation (ASF) Jakarta Tomcat servlet engine (hereafter
|
|
referred to as ASF Tomcat) provides a lightweight servlet engine that supports
|
|
servlets, JavaServer pages (JSPs), and Web application archive (WAR) files.
|
|
The HTTP Server for iSeries supports a module (mod_jk) that allows communication
|
|
between the HTTP Server (powered by Apache) and ASF Tomcat. </p>
|
|
<p>For more in-depth technical information about ASF Tomcat, see <a href="http://jakarta.apache.org/tomcat/index.html" target="_blank">http://jakarta.apache.org/tomcat/index.html</a> <img src="www.gif" alt="Link outside Information Center" />. For more in-depth
|
|
technical information about Java™ servlet technology (including the Java
|
|
Servlet Specification, V2.2), see<a href="http://java.sun.com/products/servlet/" target="_blank"> http://java.sun.com/products/servlet/</a> <img src="www.gif" alt="Link outside Information Center" />. </p>
|
|
<p>ASF Tomcat can be configured to run: </p>
|
|
<ul><li>In-process where ASF Tomcat and the HTTP Server (powered by Apache) run
|
|
in the same process and communicate through a Java native interface (JNI).
|
|
Generally, running in-process is easier to configure and gives better performance.
|
|
Running in-process also allows you to configure authentication through the
|
|
HTTP server (including the ability to swap to an authenticated user profile)
|
|
where out-of-process does not. </li>
|
|
<li>Out-of-process where ASF Tomcat runs in a separate process (this separate
|
|
process can be on a different computer than the HTTP server) and communicates
|
|
to the HTTP server through a TCP/IP sockets connection. It is important to
|
|
note that if SSL support is configured between the Web Browser and the Web
|
|
server, the connection between the Web server and the out-of-process ASF Tomcat
|
|
server is not secured with SSL. Running out-of-process allows more flexibility
|
|
in the number and type of processes that you can configure. An out-of-process
|
|
configuration allows for: <ul><li>application and functional isolation of information </li>
|
|
<li>reliability </li>
|
|
<li>serviceability </li>
|
|
<li>logically linking organizational synergies to application servlets <p>For
|
|
example, you may have different out-of-process ASF Tomcat servers on different
|
|
systems to service specific functional areas of an organization, like shipping
|
|
or accounting. </p>
|
|
</li>
|
|
</ul>
|
|
</li>
|
|
</ul>
|
|
<p>Configuration and administration of ASF Tomcat on the iSeries is accomplished
|
|
through the <span>IBM<sup>®</sup> Web Administration for i5/OS™ interface</span>. The
|
|
ASF Tomcat Basic wizard is provided as an easy way to get started configuring
|
|
servlets, JSPs, and WAR files. </p>
|
|
<p>ASF Tomcat supports the following: </p>
|
|
<ul><li>ASF Tomcat 3.2.4 </li>
|
|
<li>Java server pages (JSP) 1.1 </li>
|
|
<li>Servlet 2.2 specification </li>
|
|
<li>In-process ASF Tomcat </li>
|
|
<li>Out-of-process ASF Tomcat using mod_jk ajp12 protocol support </li>
|
|
<li>Out-of-process ASF Tomcat using mod_jk ajp13 protocol support </li>
|
|
<li>Making SSL certificates and attributes associated with the client request
|
|
available to the intended servlet, when configured as in-process or as out-of-process
|
|
using the ajp13 protocol </li>
|
|
<li>HTTP Server (powered by Apache) virtual host mapping to ASF Tomcat </li>
|
|
<li>JDK 1.2 and 1.3 </li>
|
|
</ul>
|
|
</div>
|
|
<div>
|
|
<div class="familylinks">
|
|
<div class="parentlink"><strong>Parent topic:</strong> <a href="rzaieconcepts.htm" title="This topic provides concepts of functions on HTTP Server and IBM Web Administration for i5/OS interface.">Concepts of functions of HTTP Server</a></div>
|
|
</div>
|
|
</div><div class="nested1" id="directory"><a name="directory"><!-- --></a><h2 class="topictitle2">Directory structure</h2>
|
|
<div>
|
|
<div class="tablenoborder"><table cellpadding="4" cellspacing="0" summary="" frame="border" border="1" rules="all"><thead align="left"><tr><th valign="top" width="43.87755102040816%" id="d0e117">Directory</th>
|
|
<th valign="top" width="56.12244897959183%" id="d0e119">Description</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody><tr><td valign="top" width="43.87755102040816%" headers="d0e117 "><p><tt>tomcat_home</tt></p>
|
|
</td>
|
|
<td valign="top" width="56.12244897959183%" headers="d0e119 "><p>The tomcat_home directory is the base directory for
|
|
ASF Tomcat. The tomcat_home directory can be located in the root or QOpenSys
|
|
file systems. For an in-process ASF Tomcat configuration, the default tomcat_home
|
|
directory is set to the HTTP server directory (/www/server_name/). For an
|
|
out-of-process ASF Tomcat configuration, the default tomcat-home directory
|
|
is set to /ASFTomcat/tomcat_server_name/. Within the tomcat_home directory
|
|
there are subdirectories for logs and configuration information.</p>
|
|
</td>
|
|
</tr>
|
|
<tr><td valign="top" width="43.87755102040816%" headers="d0e117 "><p><tt>tomcat_home/webapps</tt></p>
|
|
</td>
|
|
<td valign="top" width="56.12244897959183%" headers="d0e119 "><p>This directory contains WAR files if you have them.
|
|
All WAR files are expanded and subdirectories are added as contexts. </p>
|
|
</td>
|
|
</tr>
|
|
<tr><td valign="top" width="43.87755102040816%" headers="d0e117 "><p><tt>Tomcat_home/webapps/ROOT</tt></p>
|
|
</td>
|
|
<td valign="top" width="56.12244897959183%" headers="d0e119 "><p>This directory is required by ASF Tomcat.</p>
|
|
</td>
|
|
</tr>
|
|
<tr><td valign="top" width="43.87755102040816%" headers="d0e117 "><p><tt>Tomcat_home/webapps/app1</tt></p>
|
|
</td>
|
|
<td valign="top" width="56.12244897959183%" headers="d0e119 "><p>This directory is known as a document base directory.
|
|
You may have several document base directories under the webapps directory.
|
|
These represent and map a directory structure to a servlet or JSP application.</p>
|
|
</td>
|
|
</tr>
|
|
<tr><td valign="top" width="43.87755102040816%" headers="d0e117 "><p><tt>Tomcat_home/webapps/app1/WEB-INF</tt></p>
|
|
</td>
|
|
<td valign="top" width="56.12244897959183%" headers="d0e119 "><p>This directory contains the web.xml file for the
|
|
application.</p>
|
|
</td>
|
|
</tr>
|
|
<tr><td valign="top" width="43.87755102040816%" headers="d0e117 "><p><tt>Tomcat_home/webapps/app1/WEB-INF/classes</tt></p>
|
|
</td>
|
|
<td valign="top" width="56.12244897959183%" headers="d0e119 "><p>This directory contains any Java class files and
|
|
associated resources that are required for your application. This directory
|
|
is searched prior to the tomcat_home/webapps/app1/WEB-INF/lib directory for
|
|
any servlet .class file that is specified in the URL. </p>
|
|
</td>
|
|
</tr>
|
|
<tr><td valign="top" width="43.87755102040816%" headers="d0e117 "><p><tt>Tomcat_home/webapps/app1/WEB-INF/lib</tt></p>
|
|
</td>
|
|
<td valign="top" width="56.12244897959183%" headers="d0e119 "><p>This directory contains any JAR files and associated
|
|
resources that are required for your application.</p>
|
|
</td>
|
|
</tr>
|
|
<tr><td valign="top" width="43.87755102040816%" headers="d0e117 "><p><tt>Tomcat_home/conf</tt></p>
|
|
</td>
|
|
<td valign="top" width="56.12244897959183%" headers="d0e119 "><p>This directory contains the server.xml and workers.properties
|
|
configuration files.</p>
|
|
</td>
|
|
</tr>
|
|
<tr><td valign="top" width="43.87755102040816%" headers="d0e117 "><p><tt>Tomcat_home/logs</tt></p>
|
|
</td>
|
|
<td valign="top" width="56.12244897959183%" headers="d0e119 "><p>This directory contains all log files.</p>
|
|
</td>
|
|
</tr>
|
|
<tr><td valign="top" width="43.87755102040816%" headers="d0e117 "><p><tt>Tomcat_home/work</tt></p>
|
|
</td>
|
|
<td valign="top" width="56.12244897959183%" headers="d0e119 "><p>This directory is automatically generated by ASF
|
|
Tomcat as a place to store intermediate files.</p>
|
|
</td>
|
|
</tr>
|
|
<tr><td valign="top" width="43.87755102040816%" headers="d0e117 "><p><tt>Java/lib</tt></p>
|
|
</td>
|
|
<td valign="top" width="56.12244897959183%" headers="d0e119 "><p>This directory is created as a place to put .jar
|
|
and Class files that you want to add to the class path.</p>
|
|
</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
<p>See <a href="rzaiesetauth.htm">User profiles and required authorities for HTTP Server</a> for information
|
|
about authority considerations for ASF Tomcat.</p>
|
|
</div>
|
|
</div>
|
|
<div class="nested1" id="log"><a name="log"><!-- --></a><h2 class="topictitle2">Log files</h2>
|
|
<div><p>The jk.log file contains messages generated by <a href="rzaiemod_jk.htm">mod_jk</a>. It is important to note that this
|
|
file is not erased or regenerated when the ASF Tomcat engine starts. Messages
|
|
are appended to this file and the size of this file could grow very large
|
|
if errors are being logged. You should periodically monitor the size of this
|
|
file and reduce its size. By default, the jk.log is set to the logs directory
|
|
under server_home (<em>/www/server_name/logs/</em>). </p>
|
|
<p>Each time the ASF Tomcat servlet engine is started, a set of log files
|
|
is generated. These log files are all based on the configuration in the server.xml
|
|
file. The default location of the log files is in the <em>/logs</em> directory
|
|
under the tomcat_home directory. </p>
|
|
<p>The following is a description of each log file: </p>
|
|
|
|
<div class="tablenoborder"><table cellpadding="4" cellspacing="0" summary="" frame="border" border="1" rules="all"><thead align="left"><tr><th valign="top" width="16.243654822335024%" id="d0e240">Log file</th>
|
|
<th valign="top" width="83.75634517766497%" id="d0e242">Description</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody><tr><td valign="top" width="16.243654822335024%" headers="d0e240 "><p><tt>jasper.log</tt></p>
|
|
</td>
|
|
<td valign="top" width="83.75634517766497%" headers="d0e242 "><p>This log file contains messages resulting from trying
|
|
to start or run JSPs.</p>
|
|
</td>
|
|
</tr>
|
|
<tr><td valign="top" width="16.243654822335024%" headers="d0e240 "><p><tt>servlet.log</tt></p>
|
|
</td>
|
|
<td valign="top" width="83.75634517766497%" headers="d0e242 "><p>This log file contains messages generated as a result
|
|
of a servlet running in the ASF Tomcat servlet engine. When a servlet is initialized
|
|
a ServletConfig object is provided to the servlet. Contained within the ServletConfig
|
|
object is a ServletContext object that provides methods for a servlet to communicate
|
|
to the Servlet container, in this case Tomcat. On the ServletContext object
|
|
is a log method that allows Web applications to log to the servlet.log file.</p>
|
|
</td>
|
|
</tr>
|
|
<tr><td valign="top" width="16.243654822335024%" headers="d0e240 "><p><tt>tomcat.log</tt></p>
|
|
</td>
|
|
<td valign="top" width="83.75634517766497%" headers="d0e242 "><p>This log file contains ASF Tomcat servlet engine
|
|
messages.</p>
|
|
</td>
|
|
</tr>
|
|
<tr><td valign="top" width="16.243654822335024%" headers="d0e240 "><p><tt>jvmstderr.txt</tt></p>
|
|
</td>
|
|
<td valign="top" width="83.75634517766497%" headers="d0e242 "><p>This log file can contain messages from any Java
|
|
code that does a System.err.println().</p>
|
|
</td>
|
|
</tr>
|
|
<tr><td valign="top" width="16.243654822335024%" headers="d0e240 "><p><tt>jvmstdout.txt</tt></p>
|
|
</td>
|
|
<td valign="top" width="83.75634517766497%" headers="d0e242 "><p>This log file can contain messages from any Java
|
|
code that does a System.out.println().</p>
|
|
</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div class="nested1" id="process"><a name="process"><!-- --></a><h2 class="topictitle2">Process description</h2>
|
|
<div><p>Running in-process means that the ASF Tomcat module (mod_jk) uses the Java
|
|
invocation API to: </p>
|
|
<ul><li>Set up the JVM </li>
|
|
<li>Attach a given HTTP Server (powered by Apache) thread to the JVM </li>
|
|
<li>Run the servlet in the JVM </li>
|
|
</ul>
|
|
<p>The servlet, written in Java, uses the JNI interface to call to the HTTP
|
|
server to get the headers and data that accompany the HTTP request. The servlet
|
|
container invokes the target servlet, packages the response, and sends the
|
|
resulting response headers and data through the HTTP server using the JNI. </p>
|
|
<p>Running out-of-process means that the ASF Tomcat module (mod_jk) running
|
|
in the HTTP server needs to take the headers and accompanying data, package
|
|
it up into a protocol (ajp12 or ajp13), and then send that information across
|
|
a TCP socket to the system where the JVM is running. This could be on the
|
|
same system, or it could be on an different system. </p>
|
|
<p>The servlet running in the JVM does the following:</p>
|
|
<ul><li>Receives the request from the socket </li>
|
|
<li>Finds the target servlet </li>
|
|
<li>Invokes the target servlet </li>
|
|
<li>Packages the response headers and data into an ajp12 or ajp13 response
|
|
</li>
|
|
<li>Sends the response across the TCP socket to the HTTP server </li>
|
|
</ul>
|
|
<p>The ASF Tomcat module running in the HTTP Server decodes the ajp12 or ajp13
|
|
response to retrieve the HTTP headers and data. The ASF Tomcat module sends
|
|
the HTTP headers and data to the browser. </p>
|
|
</div>
|
|
</div>
|
|
|
|
</body>
|
|
</html> |