aspose file tools*
The moose likes Tomcat and the fly likes Persistent authentication Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Spring in Action this week in the Spring forum!
JavaRanch » Java Forums » Products » Tomcat
Bookmark "Persistent authentication" Watch "Persistent authentication" New topic
Author

Persistent authentication

Oliver Kohll
Greenhorn

Joined: Dec 11, 2009
Posts: 5
Hello,

I'd like to find a way to persist a login to my Tomcat app across browser restarts. For example, if I use calendar.google.com, I am still logged in after quitting the browser and starting it up again.

Ideally this would be configuration based, or perhaps by plugging in a third party authentication mechanism. Managing my own cookies would be the least preferred route.

Any ideas?
Regards
Oliver
David O'Meara
Rancher

Joined: Mar 06, 2001
Posts: 13459

provided the data stored on the session is Serializable and the Tomcat insta ce is shutdown cleanly, the session information should be persisted between Tomcat restarts. Or it was last time I checked
Oliver Kohll
Greenhorn

Joined: Dec 11, 2009
Posts: 5
Sorry, I don't mean Tomcat server restarts, I mean client side browser restarts (as long as cookies aren't cleared of course)
David O'Meara
Rancher

Joined: Mar 06, 2001
Posts: 13459

Ah. Usually session cookies are in memory only, but the easiest way to accomplish this is to write servlet code that reads the JSESSIONID cookie and then rewrite it as a persistent cookie.
Oliver Kohll
Greenhorn

Joined: Dec 11, 2009
Posts: 5
That works, thanks.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Persistent authentication