File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Servlets and the fly likes java.net.SocketException: Connection reset by peer: socket write error Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Spring in Action this week in the Spring forum!
JavaRanch » Java Forums » Java » Servlets
Bookmark "java.net.SocketException: Connection reset by peer: socket write error" Watch "java.net.SocketException: Connection reset by peer: socket write error" New topic
Author

java.net.SocketException: Connection reset by peer: socket write error

Kenny Birney
Greenhorn

Joined: Apr 27, 2004
Posts: 9
Problems a plenty!
i have myself a servelt, which calls other code to get back a Base64 encoded image. I get this back okay. However, when i try to print the image on screen (Iframe), it dies a deah, giving the above error.
below should be some code from servlet. Any help would be much appriciated.
Kenny Birney
Greenhorn

Joined: Apr 27, 2004
Posts: 9
Fixed it! turns out, if you just write all the bytes at once, rather than one at a time, it works a whole lot better. Bonza.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: java.net.SocketException: Connection reset by peer: socket write error