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

This topic provides information about how to set up Java™ servlets 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 servlet with out-of-process ASF Tomcat servlet engine on your HTTP Server (powered by Apache).

This topic assumes that you have an existing HTTP Server (powered by Apache) and you do not have a Tomcat configuration. Before you begin, review the User profiles and required authorities for HTTP Server topic.

Configure the out-of-process ASF Tomcat

  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 your worker name in the ASF Tomcat server name field. This is the name of the ASF Tomcat server. For example, mytomcat.
  6. Click Next.
  7. Accept the default value (QTMHHTTP) or enter a specific user id for Server userid.
  8. Accept the default value for Java version (JDK).
  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.
  13. Enter the port number you provided for Port.
    Note: If no port number was given (you accepted the default localhost:8009) accept the default value.
  14. Select Binary (AJP13) for Server type.
  15. Click Next.
  16. Click Add.
  17. Enter the name of your URL path for URL path. For example, /calc.
  18. Enter the name of your application base directory for Application base directory. For example, webapps/example.
    Note: Do not select the Reloadable option at this time.
  19. Click Continue.
  20. Click Configure.
  21. Click Add.
  22. Enter the name of your servlet class file for Servlet classname.

    If a jar file is used, enter the name of the servlet class in the jar file. For example, CalculatorExample.

  23. Accept the default value for URL patterns.
  24. Accept the default value for Startup load sequence.

    If you are having trouble, one possible cause is incorrect authority and permissions. See User profiles and required authorities for HTTP Server for more information.

  25. Click OK.
  26. Click Next.
  27. Click Finish.
  28. Click OK.

Configure HTTP Server (powered by Apache) for ASF Tomcat

  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 Enable from Enable servlets for this HTTP Server.
  9. Accept the default workers definition file for Workers definition file.
  10. Click Next.
  11. Select Enable for Enable "out-of-process" servlet engine connections.
    Note: Do not select the Enable an "in-process" servlet engine option at this time.
  12. Click Add.
  13. Enter the name of the out-of-process ASF Tomcat server for Worker name. For example, mytomcat.
  14. Select Binary (AJP13) for Worker type.
  15. Enter information based off one of the below conditions for Hostname:Port.
    1. Enter localhost and a port number if your out-of-process ASF Tomcat server is on your iSeries™. For example, localhost:8009.
    2. Enter the name of the remote server host and the port number if your out-of-process ASF Tomcat server is not on your local iSeries. For example, IBMiSeries:8009.
  16. Click Continue.
  17. Click Next.
  18. Click Add.
  19. Enter the name of the URL mount point for URL (Mount point). For example, /calc.
  20. Accept the default value for ASF Tomcat worker.
  21. Click Next.
  22. Click Finish.
  23. Click OK.

Place your servlet file in the correct directory

Using a file transfer method such as Netserver mapped drives or FTP, transfer the servlet to one of the following directories:

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 or Restart.
  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://myserver:port/calc, to test the configuration, where myserver:port is the name of your iSeries and port number.