Using HTML Translation Services

In this section:

The Telnet Designer in web deployment mode creates an XML rules file that controls your online session with appropriate JavaServer Pages (JSP) for each screen you want to run with a template. These templates change the look and feel of the screen or add functionality to the screen.

It is important to understand the effects of running a mainframe online application over the web. These effects can occur when using default translation with or without a generic template or when using the Telnet Designer template facility.

HTTP communication occurs in half-duplex mode, which means the communication occurs in both directions, but with only one entity communicating at a time. To bring Terminal Emulator capabilities to the web, the HTML translation services determine when the communication from the back end completes.

The following image illustrates the process of running a mainframe online application over the web.

The following commands are available:


Top of page

x
The HTML Configuration File

The Telnet Designer enables you to control parameters that affect the Emulator console, screen navigation, and the web session. The parameters have an effect on default translation and the template facility. In a web application, the web.xml file contains these parameters.



x
Reference: HTML Configuration File Parameters

The following table lists and describes the parameters that affect the Terminal Emulator console facility, screen navigation, the HTML web session, and the Telnet Designer.

Parameter

Description

Terminal Emulator Console Facility

accessLog

Logs an entry for each established session (access.log).

user

Authenticates the management commands for HTTP.

password

Is the password associated with the user.

Screen Navigation

telnetTimeout

Amount of time, in seconds, to continue to receive a response from the mainframe application. This time-out is determined by the maxTimeoutLimit and MinBufferSize parameters. A time-out is recommended when there is a possibility that partial screens will be delivered. The socket connection to the back-end application remains active across this time-out.

maxTimeoutLimit

Number of reads that the emulator attempts when it determines that the data received from the application might be incomplete.

minBufferSize

Minimum size acceptable for a Telnet screen. When the received buffer is smaller than the defined size, the adapter continues to attempt to read until the specified size is reached.

HTML web session

httpTimeout

The time, in hours, that an idle session must remain active. The time is calculated roughly between keystrokes. When an expired session is detected, the Telnet connection to the mainframe application is disconnected.

httpTimeoutUnts

The units, in hours or minutes, that httpTimeout indicates. The default value is hours.

logLevel

Used for generating logs. The log file is written to the logs subdirectory of the deployed ibitelnet webapps directory. For example:

C:\Program Files\Apache Group\Tomcat 4.1\webapps
\ibitelnet.war\logs

Valid log levels are DEBUG, INFO, WARN, ERROR, and FATAL. The default log level is DEBUG.

Template Mode

repository

Location of the created XML rules files that contain the template rules when using the Telnet Designer in web mode.

Used only in web mode when using Telnet Designer.



x
TelnetHtmlServlet Parameters

Understanding the HTML service request helps you to create screen templates. The TelnetHtmlServlet controls Telnet sessions. Each HTML screen sends parameters for the TelnetHtmlServlet to handle the Telnet screen. The types of parameters are:


Top of page

x
Screen Objects

Screen templates enable you to redesign Telnet screens. The template screen is a JavaServer Page (JSP) on which Telnet HTML Services expose a screen object. The screen object obtains the dynamic value of the Telnet Session.



Example: Using a Hyperlink Equivalent to a Keystroke

You can use a hyperlink equivalent to a keystroke as follows:

<!-- Issuing the attention key "CLEAR" -->
<a href='TelnetHtmlServlet?keyboard=CLEAR&10=brws'>Click here to browse
records</a>


Example: Using a Hyperlink Equivalent to a Field and a Keystroke

You can use a hyperlink equivalent to a field and a keystroke as follows:

<!-- Entering "brws" in the field 10  and Issuing the attention key 
"ENTER" -->
<br><a href='TelnetHtmlServlet?keyboard=ENTER&10=brws'>Click here to
broBSE records</a>


Example: Using a Hyperlink Equivalent to a Cursor and a Keystroke

You can use a hyperlink equivalent to a cursor and a keystroke as follows:

<!-- Positioning the cursor at field 16 and Issuing the attention key 
"F4" 
-->
<a href='TelnetHtmlServlet?keyboard=F4&cursor=16'>Names </a>


Example: Using a Form Field

Form fields include combo boxes for specific fields and protected and unprotected screen fields. You can use the combo box for a specific field as follows:

<!-- Using the combo box to enter the transaction name to field 10 -->
<b>Transaction:</b><select name="10">
                     <option value="inqy">Inquiry
                     <option value="adds">Add
                     <option value="updt">Update
                   </select>


Example: Using an Unprotected Screen Field

You can use an unprotected screen field as follows:

<!-- Painting field 12, which is an unprotected field for entering number
-->
<b>Number:</b><input type='text' value='' size='6' maxlength='6'
name='12'>


Example: Using a Protected Screen Field

You can use a protected screen field as follows:

<!-- Painting field 3, which is protected field  -->
<b>Number..:</b><%= screen.paintField(3) %>


Example: Using a Form Button

Form buttons are used to create keyboard strokes. You can use a form button as follows:

<!-- CREATING BUTTONS FOR KEYBOARD STROKES -->
<input type='button' value='Process' onclick='setAttention("ENTER")'>
<input type='button' value='Leave' onclick='setAttention("CLEAR")'>

iWay Software