• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Questrion on setMaxInactiveInterval

 
Veena Pointi
Ranch Hand
Posts: 442
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I just wanted to make sure following
public void setMaxInactiveInterval(int interval) method invalidates session after when given time intervall elapses?

Thanks
Veena
 
K Bala
Greenhorn
Posts: 28
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Veena, I don't think I understand your question but I will tell you what this method does.

The setMaxInactiveInterval(int interval) specifies the time, in seconds, between client requests before the servlet container will invalidate this session.

Therefore,

setMaxInactiveInterval(60) invalidates the session after 60 seconds or 1 minute of no client request.

If the interval is set to zero, session is expunged immediately. If the interval is set to any negative value, say -1 or -2, the session never times out.
 
Veena Pointi
Ranch Hand
Posts: 442
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You still answered my question.Thanks.
 
Ramasubbhu Allur Kuppusamy
Ranch Hand
Posts: 120
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Bala ,
The explanation was crisp. Thanks.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic