Session Based Configuration


Webulator/400 includes the support of session based configuration. This allows configuration to be based on the Webulator/400 configuration values (or URL) that a browser requests. The advantage of this is flexibility. You can configure the Webulator to act differently for different requests. All Webulator/400 session based configuration values can be configured independently for each Webulator/400 URL.

The configuration file is divided into sections, one section per session. A session section can contain configuration information that applies to that session and all child sessions below it. Any child session can set configuration values in its own section that will override the value it would have inherited from its parent session.

A Simple Example

If you use the WRKWBLSSN command to create an entry for the session /, then use the CHGWBLSSN command to set the signon value to *USER WblUser, a section like the one below will be created in your configuration file:
<Session />
    Signon User WblUser
In the example above, the first and third lines indicate that this configuration is for the root Webulator URL. The second line indicates that all browsers choosing this URL (and any below) will automatically be signed on as WblUser.

A Further Example

After performing the simple example above, perform the following steps:
  1. Add a black session
  2. Use the WRKWBLSSN command to create an entry for the session /Black, then use the CHGWBLSSN command to set the signon value to *USER WblUser2, and set the background color to 000000.

  3. Add a white session
  4. Use the WRKWBLSSN command to create an entry for the session /White, then use the CHGWBLSSN command to set the background color to FFFFFF.

After performing the step from the simple example and the steps from this example, your configuration file will contain sections like those below:
<Session />
    Signon User WblUser

<Session /Black>
    Signon User WblUser2
    BackgroundColor #000000

<Session /White>
    BackgroundColor #FFFFFF
The example above has three sections, representing three different URLs that a browser could access.

The first section is taken from the previous example.

The second section is a child session (or sub-session) of the first session. It changes the signon user to WblUser2. Therefore, any browser accessing this URL will automatically be signed on with that user name. There is also a configuration line that will set the background color of the browser to black.

The Signon entry in the second section overrides the entry from the first section. The BackgroundColor entry overrides the default value.

The third section is also a sub-session of the first session. As such, it inherits the Signon entry from the first section (and does not override it). Any browser accessing this URL will be signed on with the user name WblUser. The background color in this session is set to white.

How to Change the Configuration

We recommend that you use the commands to change the configuration. Alternatively, you may edit the files using an editor. The simplest way to do this is using a workstation attached to the AS/400 with Client Access/400. You will need to be aware that the editor may remove authority information because of the way it saves files.

When saving files, many editors actually rename the original file with a .bak extension and write a new file with the correct extension. If this happens, the renamed file will retain the AS/400 authority information of the original file, while the new file will get new authority information.

Related Information

Here is more information about the entries in the examples: