wood burning stoves*
The moose likes Tomcat and the fly likes How Do I Keep HttpSessions Alive in Tomcat? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Products » Tomcat
Bookmark "How Do I Keep HttpSessions Alive in Tomcat?" Watch "How Do I Keep HttpSessions Alive in Tomcat?" New topic
Author

How Do I Keep HttpSessions Alive in Tomcat?

Jason Fot
Greenhorn

Joined: Aug 26, 2010
Posts: 1
I'm having a bit of trouble with Session timeouts in my Tomcat served web application. From reading over Tomcat's documentation, sessions expire after a time which can be configured in the web.xml file.



Question) Does this mean 30 minutes from when the session was created for the user? Or 30 minutes from when the session was last accessed?

If it is, as I originally thought, 30 minutes from when the session was last accessed, I don't seem to be seeing this behavior. My sessions seem to be lost as I'm using the site. Are there any other ways to configure session behavior besides this one setting? Is there something I'm missing?

Apache Tomcat/6.0.20
William Brogden
Author and all-around good cowpoke
Rancher

Joined: Mar 22, 2000
Posts: 12761
    
    5
1. the timeout is reset every time there is a request, there are also methods for changing the timeout for an individual session.

2. note that a session is tied to a given web application - it will not be kept alive if you move to another application in the same server.

Bill
 
Consider Paul's rocket mass heater.
 
subject: How Do I Keep HttpSessions Alive in Tomcat?
 
Similar Threads
Server Session Timeout
session timeout
Session time out.
Session timeout problem
session time out. Can't you make it longer? May be about ... a day?