Configure Sessions
The session-config element defines characteristics of the sessions the servlet container creates. A session-config element contains a session-timeout element. The session-timeout element sets the default timeout, in minutes, for sessions created by servlets within this context. The container deletes sessions that remain inactive longer than the timeout period.
For example, the web.xml fragment below configures the container to set a 15 minute timeout on sessions created by servlets within the context:
<session-config>
<session-timeout>15</session-timeout>
</session-config>
Note that servlets can reset the timeout period for the context through the
rwsf::ServletContext object that represents the context. Servlets can also change the timeout on individual sessions as described in
Recovering Session State.