ibm-information-center/dist/eclipse/plugins/i5OS.ic.rzaie_5.4.0.1/rzaietomcatopjsp.htm

186 lines
12 KiB
HTML
Raw Normal View History

2024-04-02 14:02:31 +00:00
<?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="Set up JSP files for out-of-process ASF Tomcat server with HTTP Server (powered by Apache)" />
<meta name="abstract" content="This topic provides information about how to set up a Java JavaServer Page (JSP) file for use with the Tomcat servlet engine with the IBM Web Administration for i5/OS interface." />
<meta name="description" content="This topic provides information about how to set up a Java JavaServer Page (JSP) file for use with the Tomcat servlet engine with the IBM Web Administration for i5/OS interface." />
<meta name="DC.Relation" scheme="URI" content="rzaiepartomcat.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="rzaietomcatopjsp" />
<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>Set up JSP files for out-of-process ASF Tomcat server with HTTP Server
(powered by Apache)</title>
</head>
<body id="rzaietomcatopjsp"><a name="rzaietomcatopjsp"><!-- --></a>
<!-- Java sync-link --><script language="Javascript" src="../rzahg/synch.js" type="text/javascript"></script>
<h1 class="topictitle1">Set up JSP files for out-of-process ASF Tomcat server with HTTP Server
(powered by Apache)</h1>
<div><p>This topic provides information about how to set up a Java™ JavaServer
Page (JSP) file for use with the Tomcat servlet engine with the <span>IBM<sup>®</sup> Web Administration for i5/OS™ interface</span>.</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>Follow the instructions to use a JSP file with out-of-process ASF Tomcat
servlet engine on your HTTP Server (powered by Apache). </p>
<p>Before you begin, review the <a href="rzaiesetauth.htm">User profiles and required authorities for HTTP Server</a> topic.
</p>
</div>
<div>
<div class="familylinks">
<div class="parentlink"><strong>Parent topic:</strong> <a href="rzaiepartomcat.htm" title="This topic provides step-by-step tasks for the Apache Software Foundation Tomcat servlet engine.">Tomcat tasks</a></div>
</div>
</div><div class="hr" id="outofprocess"><a name="outofprocess"><!-- --></a><h2 class="topictitle2">Set up the out-of-process ASF Tomcat server</h2>
<div><ol><li>Click the <strong>Manage</strong> tab. </li>
<li>Click the <span class="uicontrol">ASF Tomcat Servers</span> subtab.</li>
<li>Expand <span class="uicontrol">Tomcat Tasks and Wizards</span>.</li>
<li>Click <strong>Create ASF Tomcat Server</strong>. </li>
<li>Enter a name for your server in the <strong>ASF Tomcat server name</strong> field
or accept the default name provided. </li>
<li>Click <strong>Next</strong>. </li>
<li>Accept the default value (QTMHHTTP) or enter a specific user id in <strong>Server
userid</strong>. Your ASF Tomcat server runs under the authority of the user id
you specify.</li>
<li>Accept the default value for <strong>Java version (JDK)</strong>. JDK 1.3 is the
only valid option for ASF Tomcat servers on i5/OS™ V5R4. Prior versions of the operating
system support JDK 1.2 also.</li>
<li>Accept the default value for <strong>ASF Tomcat home</strong>.</li>
<li>Accept the default value for <strong>Java classpath entries</strong>.</li>
<li>Click <strong>Next</strong>.</li>
<li>Accept the default value for <strong>IP address</strong>. If you specify a particular
IP address, you must ensure that workers for the ASF Tomcat module for HTTP
Server (powered by Apache) are configured to communicate specifically using
the same IP address. </li>
<li>Enter a unique port number in the <strong>Port</strong> field for your server to
use. The port you specify must not be used by any other server on your system.
</li>
<li>Select <strong>Binary (AJP13)</strong> for <strong>Server type</strong>.</li>
<li>Click <strong>Next</strong>.</li>
<li>Click <strong>Add</strong>.</li>
<li>Enter the name of your JSP file with a forward slash "<em>/</em>" before
it and <em>.jsp</em> after for <strong>URL path</strong>. For example, <em>/myjsp.jsp</em>.</li>
<li>Enter <strong>webapps/app1</strong> for <strong>Application base directory</strong>.<div class="note"><span class="notetitle">Note:</span> Do
not select the <strong>Reloadable</strong> option.</div>
</li>
<li>Click <strong>Continue</strong>.<div class="note"><span class="notetitle">Note:</span> You might receive the following warning: <pre>Cannot find a WEB-INF/web.xml configuration file under the application base directory /ASFTomcat/ENGINE1/webapps/app1. Use the "Configure" button to create one, unless you will be installing a .jsp or .war file.</pre>
This warning can be ignored, because a JavaServer Page (JSP) can be added
to your server in the next section.</div>
</li>
<li>Click <strong>Next</strong>.</li>
<li>Click <strong>Finish</strong>.</li>
<li>Click <strong>OK</strong>.</li>
</ol>
</div>
</div>
<div class="hr" id="directory"><a name="directory"><!-- --></a><h2 class="topictitle2">Place your JSP file in the correct directory</h2>
<div><p>Using a file transfer method such as an iSeries™ NetServer™ mapped drive or FTP, copy
your JSP file to the following directory: <tt>/ASFTomcat/<em>yourserver</em>/webapps/app1/jsp</tt>,
where <em>yourserver</em> is the name of the server you created in the previous
section. </p>
</div>
</div>
<div class="hr" id="http"><a name="http"><!-- --></a><h2 class="topictitle2">Set up the ASF Tomcat module for HTTP Server (powered by Apache) </h2>
<div><ol><li>Start the <span>IBM Web Administration for i5/OS interface</span>. </li>
<li>Click the <strong>Manage</strong> tab. </li>
<li>Click the <span class="uicontrol">HTTP Servers</span> subtab.</li>
<li>Select your HTTP Server (powered by Apache) from the <strong>Server</strong> list.
</li>
<li>Select <strong>Global configuration</strong> from the <strong>Server area</strong> list. </li>
<li>Expand <strong>Server Properties</strong>. </li>
<li>Click <strong>ASF Tomcat Setup task</strong> from the task list. </li>
<li>Select the <strong>Enable servlets for this HTTP Server</strong> option.</li>
<li>Accept the default workers definition file provided.</li>
<li>Click <strong>Next</strong>.</li>
<li>De-select the <strong>Enable an 'in-process' servlet engine</strong> option (selected
by default), and select the <strong>Enable 'out-of-process' servlet engine connections</strong> option. </li>
<li>Click <strong>Add</strong>.</li>
<li>Accept the default value, <tt>worker1</tt>, for the <strong>Worker name</strong> field.</li>
<li>Accept the default value, <tt>Binary (AJP13)</tt>, for the <strong>Worker type</strong> field. </li>
<li>Enter information for the <strong>Hostname:Port</strong> field based off one of
the following conditions:<ol type="a"><li>If your out-of-process ASF Tomcat server is on the local iSeries system,
select its hostname and port from the drop-down list. <div class="note"><span class="notetitle">Note:</span> If you set up
your local ASF Tomcat server to use "Any Address", it is best to have the
worker use the localhost address (127.0.0.1). However, if you specified a
particular IP address for your ASF Tomcat server, you must ensure that the
worker also uses the same address, which may or may not be the localhost address
(127.0.0.1). </div>
</li>
<li>If your out-of-process ASF Tomcat server is on a remote system, enter
its hostname and port as in the following example: <tt>iseries.ibm.com:8009</tt>,
or you may specify an IP address and port number instead of a hostname and
port number (<tt>10.9.8.7:8009</tt>).<div class="note"><span class="notetitle">Note:</span> If you set up your remote ASF
Tomcat server to use a particular IP address, you must ensure that the worker
also uses the same address.</div>
</li>
</ol>
</li>
<li>Click <strong>Continue</strong>.</li>
<li>Click <strong>Next</strong>.</li>
<li>Click <strong>Add</strong>.</li>
<li>Enter <strong>/app1/*</strong> for <strong>URL (Mount point</strong>).</li>
<li>Accept the default value for <strong>ASF Tomcat worker</strong>.<div class="note"><span class="notetitle">Note:</span> This mount
point uses a context match form, which allows any client request with a URI
containing /app1/ to be passed to the specified worker. The worker, in turn,
forwards the request to the ASF Tomcat server configured for that worker. </div>
</li>
<li>Click <strong>Add</strong>.</li>
<li>Enter the name of your JSP file with a forward slash "<em>/</em>" before
it and <em>.jsp</em> after for <strong>URL (Mount point)</strong>. For example, <em>/myjsp.jsp</em>.</li>
<li>Accept the default value for <strong>ASF Tomcat worker</strong>.<div class="note"><span class="notetitle">Note:</span> This mount
point uses an exact match form, which allows any client request containing
a URI specifically for your JSP to be passed to the specified worker.</div>
</li>
<li>Click <strong>Add</strong>.</li>
<li>Enter <strong>/app1</strong> for <strong>URL (Mount point)</strong>.</li>
<li>Accept the default value for <strong>ASF Tomcat worker</strong>.<div class="note"><span class="notetitle">Note:</span> This mount
point uses an exact match form, which allows any client request containing
a URI specifically for /app1 to be passed to the specified worker. This mount
point is different than the first one (added previously) in that the URI must
not contain an ending slash ('/'). </div>
</li>
<li>Click <strong>Continue</strong>.</li>
<li>Click <strong>Next</strong>.</li>
<li>Click <strong>Finish</strong>.</li>
<li>Click <strong>OK</strong>.</li>
</ol>
</div>
</div>
<div class="hr" id="start"><a name="start"><!-- --></a><h2 class="topictitle2">Start HTTP Server and out-of-process ASF Tomcat server</h2>
<div><ol><li>Click the <strong>Manage</strong> tab. </li>
<li>Click the <span class="uicontrol">All Servers</span> subtab.</li>
<li>Click the <span class="uicontrol">All HTTP Servers</span> tab.</li>
<li>Select your HTTP Server (powered by Apache) from the table. </li>
<li>Click <strong>Start</strong>. </li>
<li>Click the <span class="uicontrol">All ASF Tomcat Servers</span> tab.</li>
<li>Select your out-of-process ASF Tomcat server from the table. </li>
<li>Click <strong>Start</strong>. </li>
</ol>
</div>
</div>
<div class="hr" id="test"><a name="test"><!-- --></a><h2 class="topictitle2">Test your configuration</h2>
<div><ol><li>Start a Web browser. </li>
<li>Enter <tt>http://<em>yourserver</em>:<em>port</em>/app1/jsp/<em>yourjsp.jsp</em></tt>,
where <em>yourserver:port</em> is the hostname and port of your HTTP server
and <em>yourjsp.jsp</em> is the name of your JSP file. </li>
</ol>
</div>
</div>
</body>
</html>