2 1 HTTP Header Variables

LANSA for the Web Administrator

2.1 HTTP Header Variables

LANSA for the Web is capable of retrieving the values of specified HTTP Header Variables from the browser and passing them on as function parameters (FUNCPARMS) to the Web application.

HTTP Header Variable support is enabled on a per system basis using the LANSA for the Web Administrator. The HTTP Header Variables for which you want to retrieve the values are specified via the LANSA for the Web Administrator as described in HTTP Header Variables. The Header Variables that you specify and their corresponding default values are stored in the Configuration file L4W3Serv.cfg.

Function parameters used as part of the URL take priority over the function parameters used to pass on the values for HTTP Header Variables.

There is a maximum limit of twenty function parameters that may be passed on to the Web application per URL requested.

How HTTP Header Variables work

1.  The Configuration file (L4W3Serv.cfg) is loaded during the first time the LANSA for the Web IIS Plug-in or Java Servlet is started. During this load, the values of the HTTP Header Variables will be sent to the host LANSA system.
If you are using the Java Servlet, the Configuration is re-loaded the first time the Java Servlet is called after LANSAWebReset.

2.  If there are no HTTP Header Variables specified, no additional information will be sent to the host LANSA system.

3.  If there are HTTP Header Variables specified for the related system, then for each URL requested by the Browser, the IIS Plug-in or the Java Servlet will retrieve the specified HTTP Header Variable value(s) and send them as FUNCPARMS to the host LANSA system. 

4.  If the URL already contains other FUNCPARMS, then the HTTP Header Variable related FUNCPARMS will be added at the end of the list.

5.  If a value for a specified HTTP Header Variable cannot be retrieved, then the Default Value specified for the Variable will be sent instead.

Verifying that the HTTP Header Variables are sent  

To verify that HTTP Header Variables are sent, test using the User-Agent Header Variable. The HTTP Header Variable field should reflect the agent that is used. Otherwise this field will contain the default value.

Tips and Techniques

  • Values of header variables that are longer than the length specified by funcpar will be truncated.
  • If the value for a Header Variable cannot be retrieved, the default value will be sent.
  • The number following _HTTP must be in the range of 1-20 (definitions with numbers outside of this range will not be processed).
  • The values for the HTTP Header Variables will be received in UPPERCASE.
  • The default value must be specified (at least one space must be entered between the separators).
  • The function must be set to *ALL (future releases may make use of this).