Hello,

This is my first post on the list and I've been using tomcat for few years, so 
I want to start off stating that it is an excellent product.

However, I've ran into an issue, which I am not sure what to do about.

We have jsp that displays multiple images, which is being written directly to 
the page by the servlet.

<img src="/chart/DrawTestChart>

Every once in while, in the servlet,  while writing the bytes out, I get " 
ClientAbortException:  java.net.SocketException: Connection reset by peer"

At this point, I catch an exception and in finally block, I am trying to close 
response.outputstream.

After a while, the same response object is being used by tomcat again, but as 
it gets to a first filter, I can see that it's already in commited state 
(response.isCommitted()==true)

I know it's the same response object for which SocketException was generated, 
because I am printing response.hashcode() in chart servlet and in Filter

This really sucks, because anything I try to do with such response is doomed to 
fail :)

So, please advise how can I work around this issue, short of writing image in 
temp directory of tomcat as oppose to directly to response output stream.

This is tomcat apache-tomcat-5.5.20, JRE 15, WinXP.

I can provide code snippets, if it would be helpful. (chart servlet is using 
jdk classes
java.awt.image.BufferedImage to create image
javax.imageio.ImageWriter that is wrapped on top of response.outputstream)

Thanks

Leonard







---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org

Reply via email to