Friday, January 30, 2015

session-timeout in web.xml vs setMaxInactiveInterval method


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

Scrum and Scrum master

Scrum  Scrum is a framework which helps a team to work together.  It is like a rugby team (the scrum name comes from rugby game). Scrum enco...