> From: Ðavîd Låndïs [mailto:dlan...@gmail.com]
> Subject: Re: user cancels download attachment
> 
> I was hoping Tomcat would have some way of knowing that 
> it was cancelled and close it.

Look at the API spec for PrintStream: "Methods in this class never throw I/O 
exceptions".  However, you can use the checkError() method to both flush and 
see if the stream is still functional.  (Note that I haven't tried this in 
Tomcat, so I don't know if a one-end-closed socket will return false.)

> Again, the server continues to write a lot of data -- 
> 10+ megs after the user cancels.

If checkError() doesn't return false (and it's actually fully implemented), 
then something (a proxy?) must be buffering the traffic between the server and 
the client.

 - Chuck


THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY 
MATERIAL and is thus for use only by the intended recipient. If you received 
this in error, please contact the sender and delete the e-mail and its 
attachments from all computers.

Reply via email to