webAF applets can check to see whether an HTML file contains applet <PARAM> tags to set connection properties at run time. This enables a developer to create an applet that uses a particular host configuration during development and testing and then, without modifying the applet, to deploy the applet on a different host just by modifying the HTML file. It also enables debug tracing, the Middleware Server, the SAS log trap, and other items to be turned on/off without modifying the applet.
By default, the use of run-time parameters is disabled. However, you can use the Connection Customizer to allow the use of run-time parameters.
Register Connections.
connection. The Parameter Key enables applets with multiple connections to use different parameter values.
If the "Allow connection customization from HTML" check box is enabled, then webAF (and webEIS) applets can use any of the following parameter names in the HTML applet <PARAM> tags to set the corresponding connection property:
- accessMethod
- appletCodebaseRelative
- CGIBinURL
- command
- commandPrompt
- commandPromptTimeout
- deferUserInfoUntilRuntime
- funnel
- funnelHost
- host
- logTrap
- password
- passwordPrompt
- passwordPromptTimeout
- port
- portPromptTimeout
- serverArchitecture
- traceProxyClient
- username
- usernamePrompt
- usernamePromptTimeout
These <PARAM> tags are used within the applet tag in the HTML. For example, to set the
connection host name for a connection with the Param Key set to connection:
<APPLET width=600 height=400 code="a.class" name="a" ></XMP>
<PARAM name="code" value="a.class">
<PARAM name="connection.host" value="abc.us.company.com">
</APPLET>
There are also two reserved parameter names that enable the connection properties to be read from a property file:
- propertyFile
- propertyFileKey
The propertyFile parameter name is a URL that specifies the location of a property file. The property file contains a list of properties to set on the connection with the matching propertyFileKey (just like the Param Key property in the Connection Customizer). For example:
<APPLET width=600 height=400 code="a.class" NAME="a" ></XMP>
<PARAM name="code" value="a.class">
<PARAM name="connection.propertyFile" value="hosts.txt">
<PARAM name="connection.propertyFileKey" value="john">
</APPLET>
The propertyFile parameter name points to a file named hosts.txt. The applet code base will be used to create the full URL of the property file. The property file can contain any valid connection property name (as shown in the connection property sheet) and takes the following form:
key.paramKey.property=value
In this example, key is the propertyFileKey (john in the previous example), paramKey is the
name of the connection (the Parameter Key in the Connection Customizer), and property is
the name of the connection property. The value specifies the new value (Note: values that contain spaces do not need to be enclosed in quotes). For example, the following file, hosts.txt,
will set the server architecture and host name of the connection:
john.connection.serverArchitecture=PC
john.connection.host=abc
It is also possible to specify a parent key in the properties file. This enables you to subclass a group of properties that extends an existing set:
debug.connection.logTrap=true
debug.connection.traceProxyClient=true
john.connection.propertyFileKey=debug
john.connection.serverArchitecture=PC
john.connection.host=abc