Move Generated Java Servlets to Serve from Windows (Production Instance) for Web 2.0 Applications
This document assumes you have generated Java servlets on the iSeries. Then you wish to serve those apps from a Windows server in a production instance. Please follow these steps:
- Install a Run-Time instance of m-Power/mrc-Productivity series by downloading the file from here. Be sure to unzip it to your c:\.
- Copy the contents of the data dictionary (DD) directory (/mrcjava/WEB-INF/classes/DD) from your iSeries IFS to the serving directory of your Microsoft Windows server (m-power\mrcjava\WEB-INF\classes\).
- Update the Global Properties file (m-power\mrcjava\WEB-INF\classes\mrc-spring-context.xml). This file allows connections to be made to your AS400.
- This step needs to only be done the first time you setup your environment.
- You will need to add a user name/password, and {HOST} information to the AS400_REMOTE Section.
Here is what it looks like when you begin:
Here is what it needs to look like after you have finished:
Be sure to change “192.268.1.1” to the IP address of your AS400.
Be sure to change the “mrcuser” to a valid user and “mrcpw” to a valid password.
- Next, we need to change the mrc_servlet_config.xml file located in your Data Dictionary Folder.
- The only change needed here is to change the datasource location.
- The change needs to be made from as400_local1 to as400_remote1.
Here is what the file looks like before the change:
Here is what it needs to look like when you have finished:
- Start your Tomcat (Either by the batch file located in c:\m-power or via service).
- To execute the apps, point your browser to https://x.x.x.x:8011/mrcjava/servlet/DD.I00010s (where x.x.x.x is the IP address of the Windows server, DD is the data dictionary containing the servlets on that Windows server, and I00010s is an example servlet application).
- Consider setting up Tomcat as a Windows service. This document explains how.