Host On-Demand sessions are defined by the administrator and retrieved by the Host On-Demand client when a user accesses a Host On-Demand HTML file.
The session properties the user can view are fixed values and consist of a combination of the administrator's initial configuration. However, there may be times when it would be useful with some HTML files or with certain session properties, to dynamically set a value at the time when the HTML is accessed. This type of control allows you to set session property values based on information such as the IP address of the client or the time of day.
To dynamically set session properties at the time the HTML is accessed, the administrator must write a program that runs on the Web server and effectively modifies the HTML, just before it is sent to the client.
There are many ways in which an administrator could write a program to dynamically set one or more session properties using the HTML overrides, such as using Java Server Pages (JSP), servlets, Perl, REXX, or Active Server Pages (ASP).
Setting up the initial HTML file: The initial HTML file must be created using the Deployment Wizard, which will allow you to set up the features.
Setting the Codebase: During the HTML creation, add code base (relative path “/hod/”) in the Codebase field in Advanced Options panel.
Add the ConfigBase Parameter: Add a parameter to the HTML file called ConfigBase. Similar to defining “/hod/” as the Codebase in Setting the Codebase, the ConfigBase parameter is necessary because you will eventually deploy your JSP file to a location that is different than the default publish directory, and the Host On-Demand applet needs to know how to find the session configuration files located in the hostondemand/HOD/HODData directory.
Overriding HTML parametersFollowing are the steps you must follow to dynamically set session properties:
Example: Overriding the LU name based on the client's IP address
This example shows a simple way of using the IP address of the client to lookup an LU name listed in a text file and use it as an override value in a session. This example is written using JSP.
When the Deployment Wizard is used to generate a cached Java2 page, it generates the following files:
A file (c:\luname.table) is read that contains IP address/LU name pairs. The IP address of the client is used to look up the proper LU name, which is overridden in the "3270 Display" session.
After making the required changes, deploy this JSP on the application server.
YouTube Video LinkDynamically Override Session Parameter in HOD
ContactFor further information on automation and services offerings, please write to:
Technical Lead, HACP & HATS