This week's book giveaway is in the Mac OS forum.
We're giving away four copies of a choice of "Take Control of Upgrading to Yosemite" or "Take Control of Automating Your Mac" and have Joe Kissell on-line!
See this thread for details.
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


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
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
 
subject: session in jsp