Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How to set session timeout?

Status
Not open for further replies.

lsyhu

Programmer
Apr 27, 2002
12
US
Hey,

I am using WSAD to develope a web project. I put soem information in session to share in pages, such as user id. But the information in session lost after only several minutes. I think it's because session is time out. Does anyone know how to set the lenght of session, and how to check if session expires?

Thanks a lot.
Lisa
 
Easy way of setting session length is by using the following

session.setMaxInactiveInterval(3600);

This is in seconds so the session will time out after being unused for 60 minutes in this example.

Any session variables you have set will equal null once your session expires.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top