I have done this with a filter to capture the user aborting a download on a static file.
try { chain.doFilter(req,resp); // "Success" post-processing } catch (IOException ioe) { // user cancelled download // "Aborted" post-processing } I am using 4.1.29(it has worked with all 4.x versions), but I have not tested with 5.x yet. Charlie > -----Original Message----- > From: Shapira, Yoav [mailto:[EMAIL PROTECTED] > Sent: Tuesday, June 15, 2004 11:07 AM > To: Tomcat Users List > Subject: RE: Client disconnect again > > > Hi, > No such setting exists, AFAIK, and I don't find the behavior > unbelievable: there's no mandate by the servlet spec or HTTP protocol > spec that you get an exception. It only says you MAY get an exception > if the client disconnects. > > Yoav Shapira > Millennium Research Informatics > > > >-----Original Message----- > >From: Dorel Vaida [mailto:[EMAIL PROTECTED] > >Sent: Tuesday, June 15, 2004 11:04 AM > >To: Tomcat Users List > >Subject: Client disconnect again > > > >I repost this in the hope that someone will see it and give me an > >answer... > > > >Hi all. I would like to know if in Tomcat there is something like > ><ignore-client-disconnect> in resin. What I need, more specifically is > >to catch and handle the exception when a client (browser) disconnects > >during tomcat serving a request. It seems now that even if I close the > >browser I CAN STILL write in the output stream of the response and even > >flush it w/o geting an IOException in Tomcat. Here's the simple example > >I'm using, is a jsp: > > > ><[EMAIL PROTECTED] import="java.io.*" %> > > > ><% > > > >while(true){ > > > > try{ > > > > out.write(" errrrr "); > > > > out.flush(); > > > > System.out.println("output wrote"); > > > > Thread.sleep(2000); > > > > } catch (Throwable t) { > > > > t.printStackTrace(); > > > > } > > > >} > > > >%> > > > >Sorry for the bad formatting. This sample code seems to work even after > >I close the browser. No exception thrown when writing to an inexistent > >client (?!)Which seems pretty unbelievable to me, that's why I'm > asking, > >I think that there is something that I miss badly here. > > > >I have tested with tomcat 5.18 and 5.25 on sun j2sdk_1.4.2_03/ Windows > >XP. > > > >Thanks in advance > > > > > >--------------------------------------------------------------------- > >To unsubscribe, e-mail: [EMAIL PROTECTED] > >For additional commands, e-mail: [EMAIL PROTECTED] > > > > > This e-mail, including any attachments, is a confidential business > communication, and may contain information that is confidential, proprietary > and/or privileged. This e-mail is intended only for the individual(s) to whom > it is addressed, and may not be saved, copied, printed, disclosed or used by > anyone else. If you are not the(an) intended recipient, please immediately > delete this e-mail from your computer system and notify the sender. Thank > you. > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED]