Installing Apache Tomcat Server 5.0.28 on iSeries
From Support
Contents |
Introduction
If you are planning to do any Java Servlet or JSP Development on the iSeries, you would typically use either the Websphere Application Server or the Apache Tomcat Server. We like the Apache Tomcat Server because it is a freely deployable Java servlet engine that can also serve up web pages.
Historically the Apache Tomcat Server has been a pain to set up on the iSeries.
RJS has put together an automated installation procedure as a jump start to set up and use the Apache Tomcat Server on the iSeries for web development.
This installation is provided FREE and without support, except for RJS Software Systems customers who will be using Tomcat in conjunction with RJS products. We have installed this software on 3 separate AS/400's running V5R1 and V5R3 respectively. The software was also tested on an i5 Model 520 and it worked right away each time.
If you have comments on this installation, please send to Richard Schoen at: richard@rjssoftware.com
Standard Disclaimer
No warranty is implied as to the usage or fitness of this software on your iSeries system. RJS Software Systems Inc. cannot not be held liable for any problems or data loss that occurs on your iSeries system because of installation and usage of this software.
Apache Tomcat Version The current Apache Distribution in this installer is: V5.0.28
System Requirements: AS/400 - iSeries running V5R1 and above.
IBM Java Virtual Machine Version 1.4.2 (available from IBM via PTF) Use WRKLNK OBJ('/qibm/ProdData/Java400/jdk14') command to see if you have this on your system.
Make sure TCP/IP port: 8080 is not being used by running the NETSTAT OPTION(*CNN) command and observing the local ports. If 8080 is in use already, you will need to read the Apache Tomcat documentation from the following web site: http://jakarta.apache.org/tomcat/tomcat-5.0-doc/index.html and then make the appropriate Tomcat configuration change.
If you need to make Tomcat config changes, all Tomcat files will be stored in IFS folder /TOMCAT5028. You can use the WRKLNK OBJ('/tomcat5028') command to access the Tomcat IFS folder. Then use option 5 to drill into the folder where you need to change the Tomcat settings. Once you find the file you need to change, use option 2 to edit and change the settings file.
How to make the 1.4.2 JVM your default Java Virtual Machine
We are not sure if you need to make this system change, but it shouldn't hurt to make the default Java Virtual Machine to be V1.4.2.
Caution: If you have other applications using Java on the iSeries, don't make this change until off-hours when you can test.
Run the following command to edit the Java system properties file:
EDTF STMF('/qibm/userdata/java400/systemdefault.properties')
Make the following changes and then exit and save the properties file:
java.home=/QIBM/ProdData/Java400/jdk14/ java.version=1.4
Tomcat Installation
Listed below are the fast path steps to download and install Apache on your iSeries:
1.) Download and run the following EXE to unzip and launch the RJS Installer. Then follow the steps to upload and restore the library automatically via the RJS FTP Installer:
http://downloads.rjssoftware.com/files/apache/iseriestomcat-5028.exe
Make sure to use a security officer level user who has *ALLOBJ authority.
2.) After the RJSTOMCAT library has been installed, run the following commands to restore the Apache Tomcat IFS Folder /TOMCAT5028
ADDLIBLE LIB(RJSTOMCAT) RSTTOMCAT
This may take a few minutes to run.
Note: If you have troubles restoring objects, check the job log to see if its an ownershop issue. If so, simply create a user profile named DICK. Then re-run the RSTTOMCAT command. After the objects have been restored then you can delete the DICK profile. Change the parameter for "Owned object value" to *CHGOWN and have them specify a profile name.
3.) Make sure the Tomcat folder was installed
WRKLNK OBJ('/tomcat5028')
If this folder exists, you should be good to go.
4.) Tomcat Startup. Run the following command to launch the Apache Tomcat Server in the QSYSWRK subsystem:
STRTOMCAT
After running the STRTOMCAT command, you should see a job in QSYSWRK named: TOMCATSVR
You can check to see if the job is running via the following command:
WRKACTJOB SBS(QSYSWRK) JOB(TOMCATSVR)
Tomcat Shutdown. Run the following command to end the Apache Tomcat Server in the QSYSWRK subsystem:
ENDTOMCAT
5.) The initial Tomcat startup may take a few minutes because the iSeries needs to compile some of the Tomcat objects and JSP pages. This process happens automatically.
To make sure TCP/IP port: 8080 is now being used by Tomcat, run the following command and observe the local ports.
NETSTAT OPTION(*CNN)
Now that Tomcat is active, you can use the following URL to access the Apache Tomcat home page. Substitute you iSeries IP address for the IP address 1.1.1.1
Tomcat Default URL:
http://1.1.1.1:8080
If you see the Tomcat home page, then you have correctly configured Apache Tomcat for use.
6.) Installing Tomcat Java/JSP/Servlet applications. Tomcat uses an installation folder named: WEBAPPS. All of your custom applications should be deployed into the /tomcat5028/webapps IFS folder.
Once applications are copied into the WEBAPPS folder, they can be accessed via the Apache server.
Have fun developing Java/JSP pages on your iSeries and enjoy the Apache Tomcat Server.
