Setting Session Properties Dynamically

On the Eclipse-Plugin platform, HTML overrides cannot be used in order to dynamically set session properties because no HTML files are used for running the Z and I Emulator for Web plugin. If you need to have the similar functionality, do the following steps:
  1. Implement a Java class that implements the com.ibm.eNetwork.HOD.wct.IHODConfigFactory interface, which is stored in the wct.jar file. The wct.jar file is installed in the Z and I Emulator for Web publish directory. The interface has two public methods:
    public String setHodHtmlFileName()   
    public Properties getHodHtmlParameters()       
    Following is an example of such Java classes:
    Figure 1. Example of Java classes
    package com.ibm.eNetwork.HOD.wct.samples;
    
    import java.util.Properties;
    
    import com.ibm.eNetwork.HOD.wct.IHODConfigFactory;
    
    public class ConfigOverride implements IHODConfigFactory {
        /* (non-Javadoc)
         * @see com.ibm.eNetwork.HOD.wct.IHODConfigFactory#getHodHtmlFileName()
         */
        public String getHodHtmlFileName() {
            return "hodwmc";
        }
    
        /* (non-Javadoc)
         * @see com.ibm.eNetwork.HOD.wct.IHODConfigFactory#getHodHtmlParameters()
         */
        public Properties getHodHtmlParameters() {
            Properties p = new Properties();
            p.put("EnableHTMLOverrides", "true");
            p.put("TargetedSessionList", "3270 Display");
            p.put("host", "3270 Display=hostname");
            return p;
        }
  2. Package the Java class in a jar file.
  3. Edit the Update Site Utility HTML file (WCTConfig.html) in the Z and I Emulator for Web publish directory and set the showUserClass parameter to true:
    var showUserClass=“true”;  
  4. Run the Update Site Utility and specify additional parameters as follows: User JAR File Path: The file path of the jar file created on the step 2. User Configuration Factory Class: The name of the Java class implemented on the step 1.
  5. Generate a Z and I Emulator for Web plugin and deploy it to your Eclipse-Plugin platform.