Session elements are as follows:
The session manager interface is unstable. An unstable interface might be experimental or transitional. This interface therefore change change incompatibly, be removed, or be replaced by a more stable interface in the next release.
This element specifies session configuration information.
The following table describes subelements for the session-config element.
Table A–9 session-config Subelements
Element |
Required |
Description |
---|---|---|
zero or one |
Specifies session manager configuration information |
|
zero or one |
Specifies session properties |
|
zero or one |
Specifies session cookie properties |
none
Specifies session manager information.
As of Web Server, you cannot define a session manager either for a single sign-on session or for a virtual server. You must define session managers at the level of web applications.
The following table describes subelements for the session-manager element.
Table A–10 session-manager Subelements
Element |
Required |
Description |
---|---|---|
zero or one |
Specifies session manager properties. |
|
zero or one |
Specifies session persistence (storage) properties. |
The following table describes the persistence-type attribute for the session-manager element. The left column lists the attribute name, the middle column indicates the default value, and the right column describes what the attribute does.
Table A–11 session-manager Attribute
Attribute |
Default Value |
Description |
---|---|---|
persistence-type |
memory |
(Optional) Specifies the session persistence mechanism. Allowed values are memory, file, s1ws60, and mmap. Setting the value of persistence type to memory is equivalent to using Web Server’s IWS60 without any store. Setting the value of persistence type to file is equivalent to using Web Server’s IWS60 with FileStore. |
This element specifies session manager properties.
The following table describes the property subelement for the manager-properties element.
Table A–12 manager-properties Subelements
Element |
Required |
Description |
---|---|---|
zero or more |
Specifies a property, which has a name and a value. |
none
The following table describes properties for the manager-properties element.
Table A–13 manager-properties Properties
Property Name |
Default Value |
Description |
---|---|---|
reapIntervalSeconds |
60 |
Specifies the number of seconds between checks for expired sessions. Set this value lower than the frequency at which session data changes . For example, this value should be as low as possible 1 second for a hit counter servlet on a frequently accessed web site or you could lose the last few hits each time you restart the server. |
maxSessions |
-1 |
Specifies the maximum number of active sessions, or -1 (the default) for no limit. |
sessionFilename |
none; state is not preserved across restarts |
Specifies the absolute or relative path name of the file in which the session state is preserved between application restarts, if preserving the state is possible. A relative path name is relative to the temporary directory for this web application. Applicable only if the persistence-type attribute of the session-manager Element element is memory. |
Specifies session persistence (storage) properties.
The following table describes the property subelement for the store-properties element.
Table A–14 store-properties Subelement
Element |
Required |
Description |
---|---|---|
zero or more |
Specifies a property, which has a name and a value. |
none
The following table describes properties for the store-properties element.
Table A–15 store-properties Properties
Property Name |
Default Value |
Description |
---|---|---|
reapIntervalSeconds |
60 |
Specifies the number of seconds between checks for expired sessions for those sessions that are currently swapped out. Set this value lower than the frequency at which session data changes is recommended. For example, this value should be as low as possible 1 second for a hit counter servlet on a frequently accessed web site or you could lose the last few hits each time you restart the server. |
directory |
directory specified by javax.servlet.context .tempdir context attribute |
Specifies the absolute or relative path name of the directory into which individual session files are written. A relative path is relative to the temporary work directory for this web application. |
This element specifies session properties.
The following table describes the property subelement for the session-properties element.
Table A–16 session-properties Subelements
Element |
Required |
Description |
---|---|---|
zero or more |
Specifies a property, which has a name and a value. |
none
The following table describes properties for the session-properties element.
Table A–17 session-properties Properties
This element specifies session cookie properties.
The following table describes the property subelement for the cookie-properties element.
Table A–18 cookie-properties Subelement
Element |
Required |
Description |
---|---|---|
zero or more |
Specifies a property, which has a name and a value |
none
The following table describes properties for the cookie-properties element.
Table A–19 cookie-properties Properties
Property Name |
Default Value |
Description |
---|---|---|
cookiePath |
Context path at which the web application is installed. |
Specifies the path name that is set when the session tracking cookie is created. The browser sends the cookie if the path name for the request contains this path name. If set to / (root), the browser sends cookies to all URLs served by the Web Server. You can set the path to a narrower mapping to limit the request URLs to which the browser sends cookies. |
cookieMaxAgeSeconds |
-1 |
Specifies the expiration time (in seconds) after which the browser expires the cookie. The default value of -1 indicates that the cookie never expires. |
cookieDomain |
unset |
Specifies the domain for which the cookie is valid. |
cookieComment |
Web Server session tracking cookie |
Specifies the comment that identifies the session tracking cookie in the cookie file. Applications can provide a more specific comment for the cookie. |