Server push (applet) settings

To configure the server push (applet) implementation method use the following settings:
Host name
This is the host name or IP address of the server where the ZIETrans application will run. If the server is in a horizontally clustered environment, the host name should be changed by editing the application.hap file after the applications file is deployed to the server.

The browser-side applet uses a TCP/IP socket to communicate with the ZIETrans server. The host name of the server hosting the ZIETrans application is needed to create the socket. If ZIETrans is deployed on the same Web server specified by the browser's URL, then the host name parameter doesn't need be specified and the applet will use the Web server's IP address to establish the socket connection. If the ZIETrans application is on a different server, the host name parameter must be specified with either a host name or an IP address.

Port for server socket
The port on the server that the client should use to communicate with the server. A zero (0) specifies that a random unused port above 1024 is used. You can also specify a range of ports, such as 2043–4544, or a list of ports delimited by commas (,), such as 3045, 1345, 9596.
Note: If ZIETrans is vertically clustered (multiple ZIETrans instances on the same physical server) a different port must be used by each of the ZIETrans instances. If you choose to use a value other than zero (0), you must specify at least as many ports as you have ZIETrans instances. As each ZIETrans instance starts, it tries the specified ports until it finds one that is free.
Time to wait for disconnect (seconds)
The time, in seconds, that the application waits to disconnect the user after the browser is closed. This can occur if you are away from the browser for some time and you want to ensure the application disconnects. The value is specified in seconds to one decimal place. The default is 300.0 seconds (5 minutes). Valid values are numbers greater than or equal to 300.0 seconds.
Additional browser specific settings as well as non-Windows mask settings can be specified for the applet. These settings can be changed by editing the application.hap file.
When you create a new project, a tag will be generated in the file Web Content/WEB-INF/profiles/application.hap within the <classSettings> tag. Following are the default settings for the applet:
<class name="com.ibm.hats.common.AppletSettings">
   <setting name="disconnectDelay" value="300000"/>
   <setting name="enable" value="false"/>
   <setting name="hostname" value=""/>
   <setting name="ie" value="disconnect|refresh"/>
   <setting name="nonWindows" value="disconnect|refresh"/>
   <setting name="other" value="disconnect|refresh"/>
   <setting name="port" value="0"/>
</class> 
A brief explanation of each parameter:
disconnectDelay
This parameter is set from the Time to wait for disconnect (seconds) setting in the GUI for the Enable server push (applet) settings. Whenever the browser closes or loads a new page (that is, the user browses away from the ZIETrans application), the applet will wait this amount of time before disconnecting the user from the host. If it is set too low, users may be disconnected when going from one page in the application to the next. There is no real danger in setting it too high, but resources on the server and host will be held for a user who has closed the browser until the time period has passed. The default value is 300000 milliseconds (5 minutes).
enable
Use this setting to configure which automatic disconnect and refresh update method to use. Specify AJAX to configure the client pull (AJAX) method, specify true to configure the server push (applet) method, and specify false to disable both methods. The default is false. If true is specified, a listening socket is established on the given port. Each browser that connects to this application will have the applet tag inserted in the page.
hostname
The host name or the IP address of the ZIETrans server must be configured in the application.hap file to allow the applet to connect back to the ZIETrans server.
Note: For horizontal clustering, the host name should be changed by editing the application.hap file. Hand editing the .hap file needs to occur after the .ear has been deployed using the WebSphere® Application Server Admin (on the server).
port
Select the port on the server that the client should use for communicating with the server. Zero (0) specifies a random port above 1024; you can also specify a range of ports (for example, 2043-4544) or a comma-delimited list of ports (for example, 3045,1345,9596). The default value is random.
Note:
  1. If ZIETrans is behind a firewall, a zero (0) value should not be specified because it can be difficult to let arbitrary ports go through the firewall.
  2. For vertical clustering, if ZIETrans is behind a firewall, a port range can be specified. If ZIETrans is on the Web server, zero (0) or a range can be specified instead of a port number. In both cases, it is highly recommended that port numbers are specified individually on the Web servers.
The following browser-related settings determine the features to be used for a given browser or environment:
nonWindows
Specify settings for browsers that run under operating systems other than Windows. The possible options are disconnect, refresh, local. The algorithm looks for l d and r and doesn't care about separators; in order for any options to apply, they must be listed in both the operating system setting and the browser setting; (example: nonWindows=dr other=dr). The default value is disconnect|refresh.
ie
Specify settings for all versions of Internet Explorer. The default value is disconnect|refresh|local
other
Specify settings for other browsers (for example, Opera, Mozilla). The default value is disconnect|refresh.
The following values may be used for the browser-related settings listed above:
disconnect(d)
When the browser is closed, this setting causes the host-side connection from the ZIETrans server to the host to be cleaned up after expiration of the disconnectDelay timer (specified in the application.hap file). This works in any Java-enabled browser.
Note: For all browsers except Internet Explorer, when the user browses away from the ZIETrans application, this setting will cause the host-side connection to be cleaned up after expiration of the disconnectDelay timer. For more on Internet Explorer settings see disconnectAlways below.
disconnectAlways
This feature enables Internet Explorer to have the same asynchronous update applet-disconnect behavior as all other browsers (non-Internet Explorer). To illustrate:
  • Internet Explorer default behavior (disconnect specified in the application.hap file): Close of the browser causes the ZIETrans server to clean up the connection after expiration of the disconnectDelay (specified in the application.hap file) timer. User browse-away allows you to browse back and reclaim the session regardless of the value of the disconnectDelay timer.
  • All other browsers default behavior: Both close and browse-away causes the ZIETrans server to clean up the session after expiration of the disconnectDelay timer (specified in the application.hap file).
This feature enables you to specify that for Internet Explorer, the session should be cleaned up after the disconnectDelay timer has expired when either the browser is closed or the user browses away from the ZIETrans application.
To change the Internet Explorer behavior, replace disconnect with disconnectAlways. The parameter list for Internet Explorer then appears as follows:
<setting name="ie" value="disconnectAlways|refresh|local"/>
.
refresh(r)
Allow the server to automatically refresh the page when new content becomes available; this should work in any Java-enabled browser.
local(l)
Refresh only the presentation space of the page; this only works reliably in Internet Explorer V7 and later releases of Internet Explorer V6; it may cause JavaScript errors and browser failures in other environments.
To enable asynchronous update applet client-side tracing, you must specify an HTML parameter, appletJavaConsoleTrace=true, on the ZIETrans entry servlet Web address. For example,
http://myhost/myZIETrans/entry?appletJavaConsoleTrace=true
Note:
  1. This is client-side tracing as opposed to the ZIETrans server-side tracing and complements the server-side tracing for debugging applet issues.
  2. Enable this trace only when requested by a support personnel.