Session elements are as follows:
The session manager interface is unstable. An unstable interface may be experimental or transitional, and thus may change incompatibly, be removed, or be replaced by a more stable interface in the next release.
Specifies session configuration information.
The following table describes subelements for the session-config element. The left column lists the subelement name, the middle column indicates the requirement rule, and the right column describes what the element does.
Table 6–11 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.
In Sun Java System Web Server 6.1, 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. The left column lists the subelement name, the middle column indicates the requirement rule, and the right column describes what the element does.
Table 6–12 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 attributes 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 6–13 session-manager Attributes
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 Sun Java System Web Server’s IWSSessionManager without any store. Setting the value of persistence type to file is equivalent to using Sun Java System Web Server’s IWSSessionManager with FileStore. |
Specifies session manager properties.
The following table describes subelements for the manager-properties element. The left column lists the subelement name, the middle column indicates the requirement rule, and the right column describes what the element does.
Table 6–14 manager-properties Subelements
Element |
Required |
Description |
---|---|---|
zero or more |
Specifies a property, which contains a name and a value. |
none
The following table describes properties for the manager-properties element. The left column lists the property name, the middle column indicates the default value, and the right column describes what the property does.
Table 6–15 manager-properties Properties
Property Name |
Default Value |
Description |
---|---|---|
reapIntervalSeconds |
60 |
Specifies the number of seconds between checks for expired sessions. Setting 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. |
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 is memory. |
Specifies session persistence (storage) properties.
The following table describes subelements for the store-properties element. The left column lists the subelement name, the middle column indicates the requirement rule, and the right column describes what the element does.
Table 6–16 store-properties Subelements
Element |
Required |
Description |
---|---|---|
zero or more |
Specifies a property, which contains a name and a value. |
none
The following table describes properties for the store-properties element. The left column lists the property name, the middle column indicates the default value, and the right column describes what the property does.
Table 6–17 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. Setting 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. |
Specifies session properties.
The following table describes subelements for the session-properties element. The left column lists the subelement name, the middle column indicates the requirement rule, and the right column describes what the element does.
Table 6–18 session-properties Subelements
Element |
Required |
Description |
---|---|---|
zero or more |
Specifies a property, which contains a name and a value. |
none
The following table describes properties for the session-properties element. The left column lists the property name, the middle column indicates the default value, and the right column describes what the property does.
Table 6–19 session-properties Properties
Specifies session cookie properties.
The following table describes subelements for the cookie-properties element. The left column lists the subelement name, the middle column indicates the requirement rule, and the right column describes what the element does.
Table 6–20 cookie-properties Subelements
Element |
Required |
Description |
---|---|---|
zero or more |
Specifies a property, which contains a name and a value. |
none
The following table describes properties for the cookie-properties element. The left column lists the property name, the middle column indicates the default value, and the right column describes what the property does.
Table 6–21 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 / (slash), the browser sends cookies to all URLs served by the Sun Java System 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 |
Sun Java System Web Server session tracking cookie |
Specifies the comment that identifies the session tracking cookie in the cookie file. Applications can provide a specific comment for the cookie. |