• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

How to implement this requirement?

 
Ranch Hand
Posts: 40
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
HI,
How to implement a code which can automatically logout a current user if the user doesn't do any request to server, say in 15 minutes interval? Any ideas? Thanks.
Yongping
 
Greenhorn
Posts: 25
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I think you can use session.setMaxInactiveInterval(time) to auto disable an user if this user inactive for some time, you can set "time" to 900, 2000, or 10000 that is up to you.
 
Author and all-around good cowpoke
Posts: 13078
6
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
session.setMaxInactiveInterval(time)
will invalidate the session - if you want to do more than that, you can add a HttpSessionBindingListener to the session. When the session is invalidated, the listener will get called and you can clean up stuff.
Bill

------------------
author of:
 
Ranch Hand
Posts: 140
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi!,
The session can get invalidated after a predefined time interval. But you can not expect the page to get changed automatically. When the user will try to interact with the system, the page will change only then. There is nothing simpler that page will get changed automatically after say 15 min when the session expires becuase for that a program must check the status of session at a definite interval of time and if the session is invalidated it must change the page. Thst is ofcourse session binder.

Originally posted by Yongping Wang:
HI,
How to implement a code which can automatically logout a current user if the user doesn't do any request to server, say in 15 minutes interval? Any ideas? Thanks.
Yongping


------------------
Vikas Aggarwal
Technology Associate
Shakun Global Networks
[This message has been edited by vikinsa aggarwal (edited June 22, 2001).]
 
reply
    Bookmark Topic Watch Topic
  • New Topic