• Post Reply Bookmark Topic Watch Topic
  • New Topic

session timeouts greater than 30 minutes?

 
Reda Mokrane
Ranch Hand
Posts: 237
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
Tomcat session expire after 30 minutes. How can I fix it to make it greater than 30 minutes?

Thanks in advance,
Reda Mokrane
 
Peter den Haan
author
Ranch Hand
Posts: 3252
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Declaratively: in web.xml using the session-timeout element:
< session-config >
   < session-timeout >minutes< /session-timeout >
< /session-config >
This should come straight after your servlet mappings.
Programmatically: you can set it for each session separately using HttpSession.setMaxInactiveInterval(), which takes the timeout in seconds (don't you just love consistency).
- Peter
 
Reda Mokrane
Ranch Hand
Posts: 237
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks for your help Peter.
it works fine.
thanks again
Reda Mokrane
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!