ibm-information-center/dist/eclipse/plugins/i5OS.ic.rzahh_5.4.0.1/proxex3.htm

60 lines
3.9 KiB
HTML
Raw Permalink Normal View History

2024-04-02 14:02:31 +00:00
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE html
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html lang="en-us" xml:lang="en-us">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta name="security" content="public" />
<meta name="Robots" content="index,follow" />
<meta http-equiv="PICS-Label" content='(PICS-1.1 "http://www.icra.org/ratingsv02.html" l gen true r (cz 1 lz 1 nz 1 oz 1 vz 1) "http://www.rsac.org/ratingsv01.html" l gen true r (n 0 s 0 v 0 l 0) "http://www.classify.org/safesurf/" l gen true r (SS~~000 1))' />
<meta name="DC.Type" content="reference" />
<meta name="DC.Title" content="Example: Running a Java application using Tunneling Proxy Support" />
<meta name="abstract" content="The following example shows you the steps to run a Java application using tunneling proxy support." />
<meta name="description" content="The following example shows you the steps to run a Java application using tunneling proxy support." />
<meta name="DC.Relation" scheme="URI" content="proxies.htm" />
<meta name="copyright" content="(C) Copyright IBM Corporation 2006" />
<meta name="DC.Rights.Owner" content="(C) Copyright IBM Corporation 2006" />
<meta name="DC.Format" content="XHTML" />
<meta name="DC.Identifier" content="proxex3" />
<meta name="DC.Language" content="en-us" />
<!-- All rights reserved. Licensed Materials Property of IBM -->
<!-- US Government Users Restricted Rights -->
<!-- Use, duplication or disclosure restricted by -->
<!-- GSA ADP Schedule Contract with IBM Corp. -->
<link rel="stylesheet" type="text/css" href="./ibmdita.css" />
<link rel="stylesheet" type="text/css" href="./ic.css" />
<title>Example: Running a Java application using Tunneling Proxy Support</title>
</head>
<body id="proxex3"><a name="proxex3"><!-- --></a>
<!-- Java sync-link --><script language="Javascript" src="../rzahg/synch.js" type="text/javascript"></script>
<h1 class="topictitle1">Example: Running a Java application using Tunneling Proxy Support</h1>
<div><p>The following example shows you the steps to run a Java™ application
using tunneling proxy support.</p>
<div class="section"><ol><li>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). <strong>Note:</strong> 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.</li>
<li>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.</li>
<li>Set the value of the com.ibm.as400.access.AS400.proxyServer property to
be the name of your HTTP server in URL format.</li>
<li>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: <pre> java -Dcom.ibm.as400.access.AS400.proxyServer=http://psMachineName YourApplication</pre>
<div class="note"><span class="notetitle">Note:</span> 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</div>
</li>
</ol>
</div>
</div>
<div>
<div class="familylinks">
<div class="parentlink"><strong>Parent topic:</strong> <a href="proxies.htm" title="IBM Toolbox for Java includes proxy support for some classes. Proxy support is the processing that IBM Toolbox for Java needs to carry out a task on a Java virtual machine (JVM) when the application is on a different JVM.">Proxy Support</a></div>
</div>
</div>
</body>
</html>