my dog learned polymorphism*
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
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: 12781
    
    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
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: How Do I Keep HttpSessions Alive in Tomcat?