wood burning stoves 2.0*
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 Android Security Essentials Live Lessons this week in the Android forum!
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
jQuery in Action, 2nd edition
subject: session in jsp
Similar Threads
What happens to session object when session expires
strange problem using jsp and servlet
session handling in javascript
How to access CMR-fields in SessionBeans