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

 

This topic provides information about how to set up a Web Archive (WAR) file for use with the Tomcat servlet engine with the Web Administration for i5/OS.

Information for this topic supports the latest PTF levels for HTTP Server for i5/OS . IBM recommends 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 IBM Service for more information.

Follow the instructions to use a WAR 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.

 

Parent topic:

Tomcat tasks

 

Configuring 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 a name for your ASF Tomcat server.

  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 your localhost or remote server host for Port.

    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 WAR file with a forward slash "/" before it for URL path. For example, /warexample.

  18. Enter webapps followed by a forward slash "/" and the name of your WAR file for Application base directory. For example, webapps/warexample.

    Do not select the Reloadable option at this time.

  19. Click Continue

    The WAR file contains a web.xml file. The first time the WAR file is accessed, the files within the WAR file are extracted into the correct directory.

  20. Click Next.

  21. Click Finish.

  22. Click OK.

 

Configuring 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 fro this HTTP Server.

  9. Accept the default workers definition file for Workers definition file.

  10. Click Next.

  11. Select Enable from Enable "out-of-process" servlet engine connections.

    Do not select the Enable an "in-process" servlet engine option at this time.

  12. Click Add.

  13. Accept the default name or enter a new name of your ASF Tomcat server for Worker name.

    The name of the worker will be used below.

  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 your WAR file with a forward slash "/" before it for URL (Mount point). For example, /warexample.

    This name will be used below.

  20. Accept the default value for ASF Tomcat worker. Select the worker defined by you above.

  21. Click Add.

  22. Enter the name of your WAR file with a forward slash "/" before it and after it, followed by an asterisk "*" for URL (Mount point). For example, /warexample/*.

    This URL (Mount point) is necessary so the files contained in your WAR file can be accessed.

  23. Accept the default value for ASF Tomcat worker.

  24. Click Continue.

  25. Click Next.

  26. Click Finish.

  27. Click OK.

 

Placing your WAR file in the correct directory

Using a file transfer method such as Netserver mapped drives or FTP, transfer the WAR file to the following directory: /ASFTomcat/[myserver]/webapps (where myserver is your server's name).

 

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

  1. Click the Manage tab.

  2. Click 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.

 

Testing your configuration

  1. Start a Web browser.

  2. Enter http://myserver:port/warexample, where myserver:port is the name of your iSeries and port number and warexample is the name of your WAR file.