You can change the "timeout" value in two ways.
- To change one or more session (but on a per-session basis), use the setMaxInactiveInterval(int interval) method of the javax.servlet.http.HttpSession interface, passing any value in seconds. If you use a negative value, the session will never expire.
- To change all the sessions, use the web application descriptor (web.xml):
...
<session-config>
<session-timeout>[MINUTES]</session-timeout>
</session-config>
...
If you want the container to never timeout a session, use a [MINUTES] value 0 or less.