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


Win a copy of Soft Skills this week in the Jobs Discussion forum!
JavaRanch » Java Forums » Java » Servlets
Bookmark "session values" Watch "session values" New topic
Author

session values

Anonymous
Ranch Hand

Joined: Nov 22, 2008
Posts: 18944
hi all, i'm new to jsp. just wondering if i can set the timeout value of a session.
Manoj Karnavat
Greenhorn

Joined: May 08, 2001
Posts: 3
yes , there is a method
session.setMaxInactiveInterval(int)

where int is the number of seconds for which the session will be valid..
i hope your query is solved
bye
MNK
David O'Meara
Rancher

Joined: Mar 06, 2001
Posts: 13459

The short answer is 'Yes, you can'.
The slightly longer answer is that sessions are managed by the servlet container and therefore the way you actually configure the session timeout is specific to a particular Application Server.
One way you can assist this is to write the current Date/Time on the session on each page hit, then test this value when they hit the next page.
Dave.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: session values