I guess you are pressing the stop button in the browser. The exception is
thrown
because you are interrupting the communication between the browser and the
servlet.
This should be thrown even if you are not resubmitting the form. Try to
change the
code of the servlet so that when this exception occurs it does not affect
future
requests to the servlet. Check if you can do some caching mechanism, ie
storing the
entire image in memory if it does not change often and the size is not too
big. This
will make the servlet faster.

-----Original Message-----
From: LeRoux van Wyk [mailto:[EMAIL PROTECTED]]
Sent: Friday, October 19, 2001 11:02 AM
To: [EMAIL PROTECTED]
Subject: Re: JPeg Image Encoder problem under Tomcat 3.2


The same problem occurs in Netscape under Windows,Linux and Mac.
What I discovered just now is that the problem seem to occur every time I
stop a servlet executing before it gives an output and then when I resubmit
the form to invoke the servlet it throws the exception.


----- Original Message -----
From: "G.Nagarajan" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Friday, October 19, 2001 10:47 AM
Subject: RE: JPeg Image Encoder problem under Tomcat 3.2


> This could be a problem with IE, did you try it in netscape?
>
> -----Original Message-----
> From: LeRoux van Wyk [mailto:[EMAIL PROTECTED]]
> Sent: Friday, October 19, 2001 10:34 AM
> To: [EMAIL PROTECTED]
> Subject: JPeg Image Encoder problem under Tomcat 3.2
>
>
> Hi
>
> I'm running Tomcat 3.2 as a standalone on a win2000 system.The servlet I
> have created draws data from an Access DB using the JDBC-ODBC bridge and
> then displays the data in a chart using the JPEG image encoder
> class.Everything works great, but every once and again Tomcat crashes with
> the error shown below.
>
> Can anybody point me in the right direction or tell me what I'm doing
wrong?
>
> Thanx
> LeRoux
>
> Exception in thread "Thread-9" java.net.SocketException: Connection reset
by
> peer: socket write error
>
> at java.net.SocketOutputStream.socketWrite(Native Method)
>
> at java.net.SocketOutputStream.write(Unknown Source)
>
> at
>
org.apache.tomcat.service.http.HttpResponseAdapter.endHeaders(HttpResponseAd
> apter.java:124)
>
> at
>
org.apache.tomcat.core.BufferedServletOutputStream.sendHeaders(BufferedServl
> etOutputStream.java:126)
>
> at
>
org.apache.tomcat.core.BufferedServletOutputStream.reallyFlush(BufferedServl
> etOutputStream.java:236)
>
> at
>
org.apache.tomcat.core.BufferedServletOutputStream.write(BufferedServletOutp
> utStream.java:185)
>
> at sun.awt.image.codec.JPEGImageEncoderImpl.writeJPEGStream(Native Method)
>
> at sun.awt.image.codec.JPEGImageEncoderImpl.encode(Unknown Source)
>
> at sun.awt.image.codec.JPEGImageEncoderImpl.encode(Unknown Source)
>
> at FWD.doPost(FWD.java:1742)
>
> at javax.servlet.http.HttpServlet.service(HttpServlet.java:760)
>
> at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
>
> at
org.apache.tomcat.core.ServletWrapper.doService(ServletWrapper.java:405)
>
> at org.apache.tomcat.core.Handler.service(Handler.java:287)
>
> at org.apache.tomcat.core.ServletWrapper.service(ServletWrapper.java:372)
>
> at
>
org.apache.tomcat.core.ContextManager.internalService(ContextManager.java:81
> 2)
>
> at org.apache.tomcat.core.ContextManager.service(ContextManager.java:758)
>
> at
>
org.apache.tomcat.service.http.HttpConnectionHandler.processConnection(HttpC
> onnectionHandler.java:213)
>
> at
org.apache.tomcat.service.TcpWorkerThread.runIt(PoolTcpEndpoint.java:416)
>
> at
> org.apache.tomcat.util.ThreadPool$ControlRunnable.run(ThreadPool.java:501)
>
> at java.lang.Thread.run(Unknown Source)
>
> 2001-10-19 10:33:05 - Ctx( ): IOException in: R( + /servlet/FWD + null)
> reading encoded JPEG Stream
>
> 2001-10-19 10:33:05 - Ctx( ): IOException in: R( + /servlet/FWD + null)
> Connection reset by peer: socket write error
>
>
>

Reply via email to