• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Ron McLeod
  • Paul Clapham
  • Jeanne Boyarsky
  • Bear Bibeault
Sheriffs:
  • Rob Spoor
  • Henry Wong
  • Liutauras Vilda
Saloon Keepers:
  • Tim Moores
  • Carey Brown
  • Stephan van Hulst
  • Tim Holloway
  • Piet Souris
Bartenders:
  • Frits Walraven
  • Himai Minh
  • Jj Roberts

Session Timeout parameter.

 
Ranch Hand
Posts: 1051
Eclipse IDE Firefox Browser
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
 
Ranch Hand
Posts: 1376
Eclipse IDE Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
 
Ranch Hand
Posts: 46
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
why don't you just try it by putting it with different timeout values ?
 
They worship nothing. They say it's because nothing is worth fighting for. Like this tiny ad:
SKIP - a book about connecting industrious people with elderly land owners
https://coderanch.com/t/skip-book
reply
    Bookmark Topic Watch Topic
  • New Topic