This week's book giveaway is in the Jython/Python forum.
We're giving away four copies of Murach's Python Programming and have Michael Urban and Joel Murach on-line!
See this thread for details.
Win a copy of Murach's Python Programming this week in the Jython/Python forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

How to notice the user about session expire before (n) min  RSS feed

 
Saravanan Ramamoorthy
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi All,

How to notice the user about session expire before (n) min by providing popup alerts. If the user want to renew the session, need an option to provide the same.
Please provide your suggestions or reference.

Regards
Saravanan Ramamoorthy
 
William Brogden
Author and all-around good cowpoke
Rancher
Posts: 13078
6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Since the server can not send anything to the client without a request, and a request would reset the session timer, your best bet is a countdown clock in Javascript running on the browser.

Bill
 
Vikas Kapoor
Ranch Hand
Posts: 1374
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
William Brogden wrote:Since the server can not send anything to the client without a request, and a request would reset the session timer, your best bet is a countdown clock in Javascript running on the browser.

Bill


This will not be accurate if your app is open in multiple browser-tabs. This question is pain in a$$. See two different approaches I tried.

http://www.coderanch.com/t/498067/JSP/java/catch-session-timeout-event

http://www.coderanch.com/t/498677/JSP/java/response-senRedirect-does-not-seem
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!