A new project in our company required DB2 data on OS/390 to be served through JSP. We were already using DB2Connect Enterprise Edition, running at Solaris, to access DB2 on OS/390 for a different project. I knew about Tomcat as a Servlet Engine and JSP Server from a different project. I suggested this to our tech team and volunteered to get the environment setup on Linux/390. We are ultimately going to go production with this setup.
1. Installed JDK1.2 from BlackDown
After the above installs, I ran Tomcat in standalone mode and I tested the environment, it worked fine. I did get Apache and Tomcat work together using the mod_webapp connector from Apache. I had to build mod_webapp.so, as it is platform specific. I did follow these instructions. Here is the link to the mod_webapp.so in zipped version I built for our installation.
I am running Tomcat under user 'jspsrvr'. The DB2 Catalog entries are under DB2 Instance db2inst1. I will have to access DB2 database with an OS/390 user id. I was not sure how to relate all these different access levels. I just posted the situation at Marist linux s/390 mailing list in following terms:
I have installed Tomcat and JDK under a user ID 'jspsrvr'.
I have also installed DB2Connect Enterprise Edition to connect
to DB2 on OS/390. I have a DB2 instance installed under user
ID 'db2inst1'. I have made catalog definitions for the 'node',
'dcs' and 'database' under user ID 'db2inst1'.
Got a reply from theborg:
In your tomcat.sh you will need to have it run the db2profile for that instance. For example add "source /home/users/db2admin/sqllib/db2profile" to the shell script. Then in the jdbc connection string for your JSP page you will need to provide a valid userid/password and URL to the MVS database.
I just followed his directions and it worked great.