Sample code

This sample HTML code demonstrates how to start a standard IBM 3270 session with the IBM 3270 printer running in the background. The applet launches the terminal session in a separate window, and the code is designed for Internet Explorer and Firefox browsers.

The first applet in the sample loads a 3270 host session named myHost on port 23, in the browser window. The second applet opens a 3270 printer session on a device named myDevice on port 23, running in its own window. The two sessions are associated using the tnAssociation parameter.

<html>
<head>
<title>IBM 3270 with Printer Session</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<meta http-equiv="charset" content="iso-8859-1">
</head>
<body>
<h3>3270</h3>
<applet mayscript name="IBM3270Frame" 
     code="com.wrq.rweb.Launcher.class"
   codeBase="./ex/" 
     width="600" 
   height="400" 
     archive="Launcher.jar">
<param name="securityEnabled" value="false">
<param name="encryptStream" value="false">
<param name="hostURL" value="tn3270e://myHost:23">
<param name="deviceName" value="myDevice">
<param name="tnAssociation" value="assocString">
<param name="autoDetect" value="true">
<param name="launcher.sessions" value="IBM3270">
</applet>
<applet mayscript name="IBM3287Device" 
     code="com.wrq.rweb.Launcher.class"
   codeBase="./ex/" 
     width="0" 
   height="0" 
     archive="Launcher.jar">
<param name="frame" value="true">
<param name="title" value="Reflection for the Web - IBM3287Device">
<param name="securityEnabled" value="false">
<param name="encryptStream" value="false">
<param name="hostURL" value="tn3270e://myHost:23">
<param name="promptForDeviceName" value="false">
<param name="tnAssociation" value="assocString">
<param name="tn3270eConnectType" value="0">
<param name="autoDetect" value="true">
<param name="launcher.sessions" value="IBM3287">
</applet>
</body>
</html>