Screen Sample

sample

Description : A sample of any session enabled HTML page in a Web volume, that relies on applicative Component Session Management. this sample just creates a session the first time it is activated, then allows you to add some "sample" data, and retrieves this data each time it is called again.

Session Handling principles

Sessions are implicitely created by the Check() method when "FORM::session" is empty. This session identifier is the only parameter that is needed to be passed in and out through every link and form call within the session enabled domain (along with local activation CGI parameters, of course).

When the session identifier exists, the Check() method will retrieve all the stored session data into "SESSION::" scoped DIML variables.

Storing data within a session

Data are added using the Add() method, wherever in a DIML page. All "SESSION::" scoped data that are defined at the call time will be stored back into the session data container.

Session obsolescence

Session identifier is time encoded, thus it is possible to activate an "expiration timeout".

Protected documents have no visible interface of the WCT_SESSION component.


First authentication (or new session activation)
This link unlinks (!) any existing session (on demo session instance).

Your actual session record is

>id created last access data ip host user agent

In session reactivation
An active session (not too long time, care the obsolescence !!))

When you reload this page using this link, the session is recognized and previous data is loaded back from session data. You'll check this is true watching at the session ID carefully. Note the effect of the auto-capturing parameter that stores some identified CGI values and the standard WCT_context.

Dealing with session data to a session
the same active session, but first will add some sample data into the data container (howdoifeel=fineandyou?)

The data is added AFTER SESSION::CHECK() be invoked in the next page (if not, adding data would have replaced all previously recorded data), but BEFORE session data are output to page. Note that THIS page you are reading cannot add anything to session data AFTER it has been loaded into YOUR user agent.

Your session data are

Var name Var value
SESSION::WCT_context
SESSION::howdoifeel

keep in session but just updates session data value (howdoifeel=huuush!)

Same considerations than adding data. Note that THIS page you are reading cannot change anything to session data AFTER it has been loaded into YOUR user agent. Setting a session variable to "" (empty string) before adding data will destroy the session variable in the data container.