Javcript using the setTimeout method would be perfect for this
functionality.
the following script will display send you to a logout page after 15mins.
<script type="text/javascript">
setTimeout("document.location.href = 'logout.jsp';",eval(1000*60*15));
</script>
or
<script type="text/javascript">
setTimeout("alert('You session is about to expire.",eval(1000*60*15));
</script>
if you wanted to do it on the server side you could store the timeout value
as a session varible and compare that to the current time.
-----Original Message-----
From: A mailing list about Java Server Pages specification and reference
[mailto:[EMAIL PROTECTED]]On Behalf Of a b
Sent: Wednesday, March 14, 2001 1:03 PM
To: [EMAIL PROTECTED]
Subject: Session Expiration Question
Hello,
I was wondering if someone could suggest a way to
determine when a session is about to expire. For
example, if a user logs on and there is no activity to
25 minutes (session limit is set to 30).... what would
be the best way in JSP to check how long the session
has before it expires so that an alert can be sent to
the user?
Any help would be greatly appreciated, and Thanks in advance.
__________________________________________________
Do You Yahoo!?
Yahoo! Auctions - Buy the things you want at great prices.
http://auctions.yahoo.com/
===========================================================================
To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff
JSP-INTEREST".
For digest: mailto [EMAIL PROTECTED] with body: "set JSP-INTEREST
DIGEST".
Some relevant FAQs on JSP/Servlets can be found at:
http://java.sun.com/products/jsp/faq.html
http://www.esperanto.org.nz/jsp/jspfaq.html
http://www.jguru.com/jguru/faq/faqpage.jsp?name=JSP
http://www.jguru.com/jguru/faq/faqpage.jsp?name=Servlets
===========================================================================
To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST".
For digest: mailto [EMAIL PROTECTED] with body: "set JSP-INTEREST DIGEST".
Some relevant FAQs on JSP/Servlets can be found at:
http://java.sun.com/products/jsp/faq.html
http://www.esperanto.org.nz/jsp/jspfaq.html
http://www.jguru.com/jguru/faq/faqpage.jsp?name=JSP
http://www.jguru.com/jguru/faq/faqpage.jsp?name=Servlets