Win a copy of Functional Reactive Programming this week in the Other Languages forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

session in jsp

 
sean menezes
Greenhorn
Posts: 7
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 107
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 7
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanx Paul for your help.
sean menezes
Developer/Analyst
JSP/Java beans
Dhamm infotech
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic