This week's book giveaway is in the Servlets forum.
We're giving away four copies of Murach's Java Servlets and JSP and have Joel Murach 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


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
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
Author

Alerting the user about Session expiry after idle-time

Koti Samadhi
Greenhorn

Joined: Aug 26, 2009
Posts: 29
Hello,

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.

ISSUE is:
"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. "

SOLUTION tried:

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
Koti
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..


Saifuddin..
[Blog][Linkedin] How To Ask Questions On JavaRanch My OpenSource
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Alerting the user about Session expiry after idle-time
 
Similar Threads
Session management configuaration Issue
handling session time out
User Idle Time?
Javascript alert from PDF in JSP file
Session Timeout Problem