tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Williams Mark L DLPC <William...@ncsc.navy.mil>
Subject RE: On timeout
Date Wed, 10 Apr 2002 12:21:14 GMT
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:giorgio@opla.it]
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" <rcicco@alphacent.com>
To: "Tomcat Users List" <tomcat-user@jakarta.apache.org>
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:tomcat-user-unsubscribe@jakarta.apache.org>
> For additional commands: <mailto:tomcat-user-help@jakarta.apache.org>
> Troubles with the list: <mailto:tomcat-user-owner@jakarta.apache.org>
>


--
To unsubscribe:   <mailto:tomcat-user-unsubscribe@jakarta.apache.org>
For additional commands: <mailto:tomcat-user-help@jakarta.apache.org>
Troubles with the list: <mailto:tomcat-user-owner@jakarta.apache.org>

--
To unsubscribe:   <mailto:tomcat-user-unsubscribe@jakarta.apache.org>
For additional commands: <mailto:tomcat-user-help@jakarta.apache.org>
Troubles with the list: <mailto:tomcat-user-owner@jakarta.apache.org>


Mime
View raw message