WEB.XML
<session-config>
<session-timeout>10</session-timeout>
</session-config>
Info : session timeout configured in web.xml will be applied to whole application's all sessions.
Here session timeout has value in minutes. means all the sessions in the whole application will be terminated if user not performing any action on the respective session for 10mins
JAVA
mySession.setMaxInactiveInterval(10);
Info:
setMaxInactiveInterval() method takes value in seconds.
so here mySession will be terminated after 10sec.
No comments:
Post a Comment