This week's book giveaway is in the OO, Patterns, UML and Refactoring forum.
We're giving away four copies of Refactoring for Software Design Smells: Managing Technical Debt and have Girish Suryanarayana, Ganesh Samarthyam & Tushar Sharma on-line!
See this thread for details.
The moose likes Servlets and the fly likes Alerting the user about Session expiry after idle-time Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

JavaRanch » Java Forums » Java » Servlets
Bookmark "Alerting the user about Session expiry after idle-time" Watch "Alerting the user about Session expiry after idle-time" New topic

Alerting the user about Session expiry after idle-time

Koti Samadhi

Joined: Aug 26, 2009
Posts: 29

I have the Web application in which i am using Weblogic Server with jsps. My requirment is to alert user prior to the session expiry when he revisit the page after the idle-time.

"When a user is on a page for longer than the required time he is timed out. There is a time-out value on the server that I need to capture and produce an alert box on the page. "


For this i tracked the values from javax.servlet.http API

1.Login time,
2. time out value from web.xml
3.*idle time(Unable to get it).

Please suggest me the solution for this, I mean to say is there any readymade plug-in,reusble component for this.

If not then how can i track the idle time for multiple user.

Do reply me ASAP,

Thanks & Regards
Sebastian Janisch
Ranch Hand

Joined: Feb 23, 2009
Posts: 1183
If you know what the timeout is, you could simply set up a javascript timer upon site creation. Once time is up you display the notification.

JDBCSupport - An easy to use, light-weight JDBC framework -
Muhammad Saifuddin
Ranch Hand

Joined: Dec 06, 2005
Posts: 1321

read Eric's Solution Update User's Session with AJAX to get the idea and make it more dynamic..

[Blog][Linkedin] How To Ask Questions On JavaRanch My OpenSource
I’ve looked at a lot of different solutions, and in my humble opinion Aspose is the way to go. Here’s the link:
subject: Alerting the user about Session expiry after idle-time
It's not a secret anymore!