Set up JSP files for out-of-process ASF Tomcat server with HTTP Server (powered by Apache)

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.

Important: 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 http://www.ibm.com/servers/eserver/iseries/software/http/services/service.htm Link outside Information Center for more information.

Follow the instructions to use a JSP file with out-of-process ASF Tomcat servlet engine on your HTTP Server (powered by Apache).

Before you begin, review the User profiles and required authorities for HTTP Server topic.

Set up the out-of-process ASF Tomcat server

  1. Click the Manage tab.
  2. Click the ASF Tomcat Servers subtab.
  3. Expand Tomcat Tasks and Wizards.
  4. Click Create ASF Tomcat Server.
  5. Enter a name for your server in the ASF Tomcat server name field or accept the default name provided.
  6. Click Next.
  7. Accept the default value (QTMHHTTP) or enter a specific user id in Server userid. Your ASF Tomcat server runs under the authority of the user id you specify.
  8. Accept the default value for Java version (JDK). 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.
  9. Accept the default value for ASF Tomcat home.
  10. Accept the default value for Java classpath entries.
  11. Click Next.
  12. Accept the default value for IP address. 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.
  13. Enter a unique port number in the Port field for your server to use. The port you specify must not be used by any other server on your system.
  14. Select Binary (AJP13) for Server type.
  15. Click Next.
  16. Click Add.
  17. Enter the name of your JSP file with a forward slash "/" before it and .jsp after for URL path. For example, /myjsp.jsp.
  18. Enter webapps/app1 for Application base directory.
    Note: Do not select the Reloadable option.
  19. Click Continue.
    Note: You might receive the following warning:
    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.
    This warning can be ignored, because a JavaServer Page (JSP) can be added to your server in the next section.
  20. Click Next.
  21. Click Finish.
  22. Click OK.

Place your JSP file in the correct directory

Using a file transfer method such as an iSeries™ NetServer™ mapped drive or FTP, copy your JSP file to the following directory: /ASFTomcat/yourserver/webapps/app1/jsp, where yourserver is the name of the server you created in the previous section.

Set up the ASF Tomcat module for HTTP Server (powered by Apache)

  1. Start the IBM Web Administration for i5/OS interface.
  2. Click the Manage tab.
  3. Click the HTTP Servers subtab.
  4. Select your HTTP Server (powered by Apache) from the Server list.
  5. Select Global configuration from the Server area list.
  6. Expand Server Properties.
  7. Click ASF Tomcat Setup task from the task list.
  8. Select the Enable servlets for this HTTP Server option.
  9. Accept the default workers definition file provided.
  10. Click Next.
  11. De-select the Enable an 'in-process' servlet engine option (selected by default), and select the Enable 'out-of-process' servlet engine connections option.
  12. Click Add.
  13. Accept the default value, worker1, for the Worker name field.
  14. Accept the default value, Binary (AJP13), for the Worker type field.
  15. Enter information for the Hostname:Port field based off one of the following conditions:
    1. If your out-of-process ASF Tomcat server is on the local iSeries system, select its hostname and port from the drop-down list.
      Note: 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).
    2. If your out-of-process ASF Tomcat server is on a remote system, enter its hostname and port as in the following example: iseries.ibm.com:8009, or you may specify an IP address and port number instead of a hostname and port number (10.9.8.7:8009).
      Note: 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.
  16. Click Continue.
  17. Click Next.
  18. Click Add.
  19. Enter /app1/* for URL (Mount point).
  20. Accept the default value for ASF Tomcat worker.
    Note: 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.
  21. Click Add.
  22. Enter the name of your JSP file with a forward slash "/" before it and .jsp after for URL (Mount point). For example, /myjsp.jsp.
  23. Accept the default value for ASF Tomcat worker.
    Note: 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.
  24. Click Add.
  25. Enter /app1 for URL (Mount point).
  26. Accept the default value for ASF Tomcat worker.
    Note: 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 ('/').
  27. Click Continue.
  28. Click Next.
  29. Click Finish.
  30. Click OK.

Start HTTP Server and out-of-process ASF Tomcat server

  1. Click the Manage tab.
  2. Click the All Servers subtab.
  3. Click the All HTTP Servers tab.
  4. Select your HTTP Server (powered by Apache) from the table.
  5. Click Start.
  6. Click the All ASF Tomcat Servers tab.
  7. Select your out-of-process ASF Tomcat server from the table.
  8. Click Start.

Test your configuration

  1. Start a Web browser.
  2. Enter http://yourserver:port/app1/jsp/yourjsp.jsp, where yourserver:port is the hostname and port of your HTTP server and yourjsp.jsp is the name of your JSP file.