Setting session timeout

Two ways to set session timeout:
1.Configuring session timeout in the DD:
<web-app ..>
<servlet>
...
</servlet>
<session-config>
   <session-timeout>15<session-timeout>
</session-config>
</web-app>

2.Setting session timeout for a specific session:
session.setMaxInactiveInterval(20*60);

3.session.invalidate()      //here we invalidate the session.

你可能感兴趣的:(session timeout)