Win a copy of Programmer's Guide to Java SE 8 Oracle Certified Associate (OCA) this week in the OCAJP forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Alert user before session timeout

 
Srinivasarao Borra
Greenhorn
Posts: 7
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I need some help displaying an alert to the user of their session expiration. If the click okay I need some type of server call that resets their session time but maintains their session variables.

Please help as this is very critical.

Srinivas
 
Purushoth Thambu
Ranch Hand
Posts: 425
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

I need some type of server call that resets their session time but maintains their session variables.


This is javascript related one, javascript support functions which can be called after "N" seconds. On page load event call setTimeout() function with function to be invoked and timeout period. On the timeout function you can alert the user and based on the response you can make asynchronous request to the server to keep the session active.
 
Eric Pascarello
author
Rancher
Posts: 15385
6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Search Google for

Pascarello Session Timeout

Eric
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic