I don't know if there's an easy way to tell your user that they've timed out
before they"submit" something, but in your JSP/servlet action you can also
use something like

HttpSession session = request.getSession(false);

where "request" is HttpServletRequest. If "session" is null, the timeout has
expired and you can display an appropriate page.

See
http://java.sun.com/products/servlet/2.1/api/javax.servlet.http.HttpServletR
equest.html


Mark

-----Original Message-----
From: Giorgio Ponza [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, April 10, 2002 4:26 AM
To: Tomcat Users List
Subject: Re: On timeout


maybe you can use this method in your JSP
boolean session.isNew()
saying if the session id is just created or not.
Giorgio
----- Original Message -----
From: "Raphael Di Cicco" <[EMAIL PROTECTED]>
To: "Tomcat Users List" <[EMAIL PROTECTED]>
Sent: Wednesday, April 10, 2002 11:06 AM
Subject: On timeout


> Hi,
>
> I have had this problem for a long time. This may not be very difficult
but
> still.
>
> I have a timeout on my server, let's say 10 minutes. After 10 minutes, all
> session variables are destructed, so the user gets an exception message
once
> he tries to interact with the application.
>
> Is there anyway I can detect this so that I can warn the user ?
>
> Thanks,
> Raphaël
>
> --
> To unsubscribe:   <mailto:[EMAIL PROTECTED]>
> For additional commands: <mailto:[EMAIL PROTECTED]>
> Troubles with the list: <mailto:[EMAIL PROTECTED]>
>


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

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

Reply via email to