aspose file tools*
The moose likes Servlets and the fly likes session in jsp 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 » Java » Servlets
Bookmark "session in jsp" Watch "session in jsp" New topic
Author

session in jsp

sean menezes
Greenhorn

Joined: Nov 06, 2000
Posts: 7
Hi
i am sean.I am working on JSP with java beans.I would like to know how to set the session time in my JSP page.It expires currently in 5 minutes
Paul Wetzel
Ranch Hand

Joined: Nov 02, 1999
Posts: 107
Try this from the Servlets and JSP javadoc on Interface HttpSession:
setMaxInactiveInterval(int interval) Specifies the time, in seconds, between client requests before the servlet container will invalidate this session.
get an instance of the session from the request and set the time out/interval to what ever you want (20 minutes in my example)

hope this helps
paul
[This message has been edited by Paul Wetzel (edited November 07, 2000).]
sean menezes
Greenhorn

Joined: Nov 06, 2000
Posts: 7
Thanx Paul for your help.
sean menezes
Developer/Analyst
JSP/Java beans
Dhamm infotech
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: session in jsp