aspose file tools*
The moose likes HTML, CSS and JavaScript and the fly likes session timeout Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Engineering » HTML, CSS and JavaScript
Bookmark "session timeout" Watch "session timeout" New topic
Author

session timeout

robbie keane
Ranch Hand

Joined: Sep 05, 2005
Posts: 54
Using javascript, how do I warn people when their session is about to expire?

Thanks.
Robbie
Eric Pascarello
author
Rancher

Joined: Nov 08, 2001
Posts: 15376
    
    6
I wrote an article on it here.

Eric
Eric Pascarello
author
Rancher

Joined: Nov 08, 2001
Posts: 15376
    
    6
ooppps: http://radio.javaranch.com/pascarello/2005/10/25/1130246930301.html

there is the link
Sanjiv Jivan
Ranch Hand

Joined: Nov 03, 2005
Posts: 52
The article is very useful. In my web app I have the browser client poll every minute for notification messages (via AJAX). As a result the users' session never expires and so I can't simply query my server side session to find out if the session is about the expire. I am using JSP/Servlets on the server side. I would almost like the polling client to be a separate session and not interfere with the "main" user session. Any ideas on how I can resolve this?

Thanks,
Sanjiv
Eric Pascarello
author
Rancher

Joined: Nov 08, 2001
Posts: 15376
    
    6
I had another article on that topic: http://radio.javaranch.com/pascarello/2005/10/31/1130778395760.html

hopefully that answers questions.

Eric
Sanjiv Jivan
Ranch Hand

Joined: Nov 03, 2005
Posts: 52
Thanks! Good to see that others have thought about this problem as well. I'll just implement this using a servlet filter that updates the timestamp if the request in not a poll request.

Sanjiv
 
Don't get me started about those stupid light bulbs.
 
subject: session timeout