• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

session timeout in web.xml not working

 
Sandeep Vaid
Ranch Hand
Posts: 392
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I am using tomcat 5.5.17 and mozilla 2.0.0.2
i have provided
<session-timeout>-1</session-timeout>

but my session is not getting invalidated(). Why ?


HttpSession session = req.getSession();
if(session.isNew())
{
System.out.println("New Session");
}
else
{
System.out.println("Old Session");
}
 
Marc Peabody
pie sneak
Sheriff
Posts: 4727
Mac Ruby VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
It's not getting invalidated because your timeout setting is working.

-1 in the DD means the session never times out.

Check out this thread for a full reference.
 
Sandeep Vaid
Ranch Hand
Posts: 392
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks !!! I got my mistake...
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic