On an associated topic... When someone clicks the browser stop button and the session eventually times out, I have in the past implemented HttpSessionBindingListener on a special class used just for cleaning up the database/ejbs and attached an instance to the session in an overridden ActionServlet when a new session is detected. Is there another way of doing this... Or something that I have overlooked in Struts. "Craig R. McClanahan" wrote:
On Mon, 29 Jul 2002, Eddie Bush wrote: > Date: Mon, 29 Jul 2002 14:10:45 -0500 > From: Eddie Bush > Reply-To: Struts Users Mailing List > To: Struts Users Mailing List > Subject: Re: how to detect when the user presses the stop button > > Yes, it has been answered. The answer is that, assuming the page they > are waiting to load is printing things out, you will get an IOException > when you try to send output. AFAIK, this is the only way to detect it. > About the best you can hope for is that you *may* get an IOException -- there are no guarantees. Two cases where you definitely won't: * When the response content is small enough to fit into the response buffer, and you didn't flush it before returning from the servlet's doGet() or doPost() method -- the container might encounter a problem when it flushes, but it's too late for your application to hear about it. * When your client is conencted to you via a proxy server (or something like the Apache-Tomcat web connector), where there is an intermediary involved -- unless the intermediary is designed to forward a disconnect notification in some manner that your servlet container understands (and, for HTTP proxies, there's basically nothing like this). This is one of the issues that makes programming web apps quite interesting ... Craig > Andrew Geery wrote: > > >I was looking through the struts archive and I've seen this question asked > >but never answered. > > > >See http://nagoya.apache.org/eyebrowse/ReadMsg?listId=42&msgNo=30063 > >for the original question. > > > >-- > >To unsubscribe, e-mail: > >For additional commands, e-mail: > > > > > > -- > To unsubscribe, e-mail: > For additional commands, e-mail: > > -- To unsubscribe, e-mail: For additional commands, e-mail: --------------------------------- Do You Yahoo!? Yahoo! Health - Feel better, live better