Andrew,

I do this now. The way I'm doing it differs slightly from what Leandro suggests but 
the principle is the same.

As soon as the user logs in, I set the username and password as session variables, 
along with a session timeout. Then, in each succeeding page, I check to see that the 
session hasn't timed out and that session.username and session.password are still 
valid variables. If any of the above is applicable, I <jsp:forward> them to a page 
explaining that they have timed out and redirect them to the log in page. The interim 
page is probably unnecessary but it allows the user to understand what is happening 
instead of thinking some kind of error has occurred.

Cheers,
--
David L. Rice
--------------------------

-----Original Message-----
From: Leandro Peres [mailto:[EMAIL PROTECTED]]
Sent: Thursday, August 30, 2001 7:36 PM
To: [EMAIL PROTECTED]
Subject: Re: Detect Session Expired, redirect to page


Put an object in the session, like
"session.putValue("myObj",new Object())", on your
first access to the application, then test if myObj is
null when you want to detect that a session has
expired or not.

Leandro.

 --- Andrew Bruno <[EMAIL PROTECTED]> escreveu: >
Hello All,
>
> I was wondering if anyone could pass on some insight
> on how to detect
> that a session has expired, so that I may redirect
> to a  specific page
> informing the user of this?
>
> Thanks,
>
> :ab
>
>
==========================================================================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

_______________________________________________________________________________________________
Yahoo! GeoCities
Tenha seu lugar na Web. Construa hoje mesmo sua home page no Yahoo! GeoCities. � f�cil 
e gr�tis!
http://br.geocities.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

Reply via email to