Session

The Session object is an ObjectDictionary that you can use to store information needed for a particular user-session. Variables stored in the Session object are not discarded when the user jumps between pages in the application; instead, these variables persist for the entire user-session.

The Web server automatically creates a Session object when a Web page from the application is requested by a user who does not already have a session. The server destroys the Session object when the session expires or is abandoned.

One common use for the Session object is to store user preferences set on a previous visit to the Web application, such as high, medium, or low graphics.

Note Session state is only maintained for browsers that support cookies.

public class Session extends ObjectDictionary

{

public ObjectDictionary staticObjects;

public String getSessionID();

public int getTimeout();

public void setTimeout(int timeout);

public int getLCID();

public void setLCID(int lcid);

public int getCodePage();

public void setCodePage(int cp);

public void abandon();

}

public ObjectDictionary staticObjects

The ObjectDictionary that contains all of the objects created with the <OBJECT> tag and given session scope

public String getSessionID()

Returns the session identification for this user.

public int getTimeout()
public void setTimeout(int timeout)

The timeout period for the session state for this application, in minutes.

public int getLCID()
public void setLCID(int lcid)

The locale identifier.

public int getCodePage()
public void setCodePage(int cp)

The codepage that will be used for symbol mapping

public void abandon()

This method destroys a Session object and releases its resources.