I have found the answer so I give the contribution :

//put this code in every page with a @page include
<%
long timeout = (new Date()).getTime() - session.getLastAccessedTime();
if(session==null || (timeout > session.getMaxInactiveInterval()*1000))
{
        throw new MyException("Session has expired : <A HREF='" + 
response.encodeURL("login.jsp") + "'>reconnect</A>");
}
%>

then catch the exception in error.jsp and print the message



On Thursday 25 April 2002 10:16, Raphael Di Cicco wrote:
> Hi
>
> my web application has a timeout of 15 minutes. I'm trying to figure out
> how to check whether there is a timeout, and in this case warn the user to
> come back to the login page (instead of a horrible NullPointerException).
>
> Did anyone come up with a JSP that's working with this ?


--
To unsubscribe:   <mailto:[EMAIL PROTECTED]>
For additional commands: <mailto:[EMAIL PROTECTED]>
Troubles with the list: <mailto:[EMAIL PROTECTED]>

Reply via email to