Win a copy of The Java Performance Companion this week in the Performance forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Session Timeout parameter.

 
Shanky Sohar
Ranch Hand
Posts: 1051
Eclipse IDE Firefox Browser
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi All,

As we know there are three simple ways to set timeout.

1)WEB.XML(Application's).

2)WEB.XML(tomcat's in conf folder).

Format :
<session-config>
<session-timeout>3</session-timeout>
</session-config>

3)Is in Particular session Object

request.getSession().setMaxInactiveInterval(60*10);


I am confused which one will take more precedence at the time when application run,if i set timeout for a session in

Application web.xml to 30 Min
and tomcat web.xml to 60 min

and in session Object to 10 min.

After how much time session will get timeout

Thanks
Shanky
 
Abhay Agarwal
Ranch Hand
Posts: 1376
Eclipse IDE Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Any session timeout set in Server's web.xml is overriden by timeout set in Application's web.xml.
And session timeout set in Application's web.xml is overridden by timeout set in Servlet code.

So, session timeout shall be 10 minutes

Happy learning

~ abhay
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic