Terminal Emulation & Transformation Community
  • Home
  • Blogs
  • FORUM
  • About
  • Contact
  • Resources

Modifying session properties dynamically in HOD

7/2/2020

0 Comments

 
Picture
Introduction
​
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:
  1. Enable HTML overrides: By default, the client will ignore HTML overrides. To enable overrides, you will need to include an HTML parameter called EnableHTMLOverrides and set it to value “True”.
  2. List the sessions to be overridden: Because there may be multiple sessions associated with HTML, you will need to list which ones will be overridden. You will need to include an HTML parameter called TargetedSessionList, which has a value of the exact names of the sessions that should accept overrides. The value must be a comma-separated list of session names, such as "Session1Name, Session2Name".
  3. Specify the override itself: For each session property to be overridden, you will need to include an HTML parameter called the property name, with the value being the desired override. The value you specify will then apply to all sessions listed in your TargetedSessionList parameter. You can specify a value in the format of "Session1Name=value1”.
  4. Specific session properties that can be overridden: Refer to Host On-Demand Knowledge Center to know what all session properties can be overridden.

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:
  • Example1.html
  • z_Example1.html
  • Example_J2.html

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:
ZIO@hcl.com.
 
Deepak Bohra
Technical Lead, HACP & HATS
0 Comments



Leave a Reply.

    Archives

    May 2020
    October 2019
    July 2019
    June 2019
    May 2019
    March 2019
    November 2018
    October 2018
    September 2018
    August 2018
    July 2018
    June 2018
    May 2018
    April 2018
    March 2018
    February 2018
    January 2018
    December 2017
    October 2017
    September 2017

    Categories

    All
    HACP
    HACPEE
    HATS
    HOD
    PCOMM

    RSS Feed

Proudly powered by Weebly
  • Home
  • Blogs
  • FORUM
  • About
  • Contact
  • Resources