tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Fang Yidong <>
Subject Re: How can I get notified when the HTTP client close the connection?
Date Sun, 25 May 2003 09:22:09 GMT
Tim,I think I've figure out why I can't catch an IOException on the client abort.It's the!
I use PrintStream to get some convenience to write multi-part data boundary,but I fail to
read the PrintStream API documentation carefully:
A PrintStream adds functionality to another output stream, namely the ability to print representations
of various data values conveniently. Two other features are provided as well. Unlike other
output streams, a PrintStream never throws an IOException; instead, exceptional situations
merely set an internal flag that can be tested via the checkError method. Optionally, ...
So the following code never get an IOException even if the underlying stream fail to output
any data:
OutputStream out=new PrintStream(response.getOutputStream());
catch(IOException e){
  /*never reached*/
Which is similar to my codes!
Thanks for all the days!

Do You Yahoo!?
  • Unnamed multipart/alternative (inline, 8-Bit, 0 bytes)
View raw message