The following example shows you the steps to run a Java™ application
using tunneling proxy support.
- Choose the HTTP server that you want to run the proxy server, then configure
it to run servlet com.ibm.as400.access.TunnelProxyServer (in jt400.jar). Note: Ensure
that the HTTP server has a connection to the iSeries™ server that contains the data
or resource that the application uses because the servlet connects to that iSeries to
carry out requests.
- Choose a machine to act as the client and ensure that the CLASSPATH on
the client machine includes the jt400Proxy.jar file and your application
classes. The client must be able to connect to the HTTP server but does not
need a connection to the iSeries server.
- Set the value of the com.ibm.as400.access.AS400.proxyServer property to
be the name of your HTTP server in URL format.
- Run the application, setting the value of the com.ibm.as400.access.AS400.proxyServer
property to be the name of your HTTP server in URL format.. An easy way to
do this is by using the -D option found on most JVMs:
java -Dcom.ibm.as400.access.AS400.proxyServer=http://psMachineName YourApplication
Note: The proxy client code creates the correct servlet URL by concatenating
"servlet" and the servlet name to the server name. In this example, it converts
http://psMachineName to http://psMachineName/servlet/TunnelProxyServer