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 IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

session

Status
Not open for further replies.

Kendel

Programmer
Apr 24, 2002
1,512
US
Hi All,


I set this in my web.xml
Code:
<session-config>
	<session-timeout>10</session-timeout>
</session-config>
On my page, I use meta tag to refresh the page at the 11th minute, and check:
Code:
<%if (session.getAttribute("UserName")==null)
	response.sendRedirect("index.jsp");
%>
It should send user back to login page because the session has expired but it didn't. What am I missing here? Can someone please help? Thanks.
 
There was no activity during 11 minutes testing.
 
OK, it will work if I add:
session.setMaxInactiveInterval(10);
Now, how can I detect the session timeout automatically? I don't want to use meta refresh because sometime it take a while for the page to reload.

Thanks.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top