File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
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

session in jsp

sean menezes

Joined: Nov 06, 2000
Posts: 7
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
[This message has been edited by Paul Wetzel (edited November 07, 2000).]
sean menezes

Joined: Nov 06, 2000
Posts: 7
Thanx Paul for your help.
sean menezes
JSP/Java beans
Dhamm infotech
I agree. Here's the link:
subject: session in jsp
It's not a secret anymore!