• Post Reply Bookmark Topic Watch Topic
  • New Topic

User Account Management  RSS feed

 
ashirvad jain
Ranch Hand
Posts: 50
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Is there any way in which i can manage the user's login time & logout time ,with the elapse time.

all the suggestion and help are appriciatable.
 
jiju ka
Ranch Hand
Posts: 308
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Your question is not clear to give a precise answer.


To terminate a user session after certain period of time use the session time out of servlet container, configurable through your application server.

To only allow certain time to user session you need to plan a strategy. After that certain time user should get a popup asking user whether there is any intention to continue. If user responds no or not responds terminate the session using session.invalidate()

If you want to do something before the user closes the browser you may use the javascript event onBeforeUnload.

Hope this helps
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!