Administer session tracking for your application server

You can use the administrative console and wsadmin to configure session tracking for your application server. In simple terms, an HTTP session consists of all of the HTTP requests from a single browser session. For example, if a user accesses an application and remains connected to the application for 10 minutes before exiting the application, all of the requests that the client makes in that 10 minute period are part of one session. If the user subsequently accesses the application, a new session is created. For more information on sessions, see Sessions in Application development.

The session manager allows to configure several settings for session tracking. These settings change how your application server treats HTTP sessions.

Use the administrative console to administer session tracking

To configure session tracking with the administrative console, follow these steps:

  1. Start the administrative console.

  2. Expand Servers and click Application Servers.

  3. Click the name of your application server.

  4. On the application server's page, click Web Container.

  5. On the Web Container page, click Session Management.

  6. Configure session management settings.

  7. Click Apply or OK.

  8. Save the application server configuration.

Use wsadmin to administer session tracking

To configure session tracking with wsadmin, follow these steps:

    On the CL command line, run the STRQSH (Start Qshell) command.

    Run the cd command to change to the directory that contains the wsadmin tool:

    cd /QIBM/ProdData/WebASE51/ASE/bin

    Start wsadmin.

    At the wsadmin prompt, run this command to identify the application server and assign it to the server variable:

    set server [$AdminConfig getid /Cell:myCell/Node:myNode/Server:myAppSvr/]

    where myCell is the name of the cell that contains your application server, myNode is the name of the node that contains your application server, and myAppSvr is the name of your application server.

    Identify the session manager for the application server and assign it to the smgr variable:

    set smgr [$AdminConfig list SessionManager $server]

    Modify the attributes for session tracking.

    • To enable cookies and modify cookie settings, run this command:
      $AdminConfig modify $smgr {{enableCookies true}
       {defaultCookieSettings {{maximumAge 10}}}}

    • To enable protocol switch rewriting, run this command:
      $AdminConfig modify $smgr {{enableProtocolSwitchRewriting true}
       {enableUrlRewriting false} {enableSSLTracking false}}

    • To enable URL rewriting, run this command:
      $AdminConfig modify $smgr {{enableUrlRewriting true}
       {enableProtocolSwitchRewriting false} {enableSSLTracking false}}

    • To enable SSL tracking, run this command:
      $AdminConfig modify $smgr {{enableSSLTracking true}
       {enableProtocolSwitchRewriting false} {enableUrlRewriting false}}

    These commands have been wrapped for display purposes.

    Run this command to save your changes:

    $AdminConfig save