Win a copy of Murach's Python Programming this week in the Jython/Python forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Automatic Timeout  RSS feed

 
Anthony Smith
Ranch Hand
Posts: 285
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
There are two types of timeouts that I know that implement this feature.
One could be where you logged into a site and if you just let the screen sit there, it will automatically send you to a screen that said your session timed-out. Another one does not do it until you try to do something.
How do you implement both?
I am especially interested in the automatic one.
 
Jason Kilgrow
Ranch Hand
Posts: 47
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by Anthony Smith:
There are two types of timeouts that I know that implement this feature.
One could be where you logged into a site and if you just let the screen sit there, it will automatically send you to a screen that said your session timed-out. Another one does not do it until you try to do something.
How do you implement both?
I am especially interested in the automatic one.

Implementing the non-automatic one is easy. You don't have to do anything because it is built into the servlet engine. You can configure how long it takes for the session to expire in the web.xml file.
The automatic one is one that I'm not familiar with. However, it seems to me that you might be able to do something like this with javascript. Maybe something like setTimeout("doFunction()", "1800000"); This would execute doFunction() after 30 minutes.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!