• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

How to use setMaxInactiveInterval()

 
Sundaralingam Subramaniyan
Greenhorn
Posts: 11
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
can any one explain me about setMaxInactiveInterval() method.
i have used this method as

HttpSession session = req.getSession(true);
session.setMaxInactiveInterval(5);

but the problem is after 5 seconds, the session is still active.
i need assistance
 
Ben Souther
Sheriff
Posts: 13411
Firefox Browser Redhat VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Sundar_S,
Please check your private messages.
-Ben
 
Amol Nayak
Ranch Hand
Posts: 218
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
By using setMaxInactiveInterval you are ensuring that the session is no longer valid after the specified time of inactivity. What you have done look ok.

What are you doing to test this out? Post all your code and explain.
 
Gobinath Manoj
Greenhorn
Posts: 11
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Please give me the code fully, Bcoz your session inactive method id correct i think you have problem with your code
 
Bear Bibeault
Author and ninkuma
Marshal
Pie
Posts: 64959
86
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Gobinath Manoj, please use real words when posting to the forums. Abbreviations such as "bcoz" in place of "because" only serve to make your posts more difficult to read and less likely to generate useful responses.

Please read this for more information.

thanks,
bear
JavaRanch sheriff
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic