Re: POST fixed - now SocketException

Actually, the StringBuffer was fine, it was the frameDisplay String I
was using to buffer up the content beforehand.  I had tried clearing it
before, but I had done it in the init() which wasn't passing on
frameDisplay anyway.  I moved it into the main part of the code (after
doPost) and it's flushing just fine.  Thank you, tidy bowl man!

Now the SocketException nastiness.  Any help on this would be awesome. 
I can't tell whether this is JavaMail or some sort of servlet timeout or
buffer problem.  If there are some props in Jigsaw that might help me
debug this, I would love someone to point me in the right direction.

Jigsaw spat this at me when d/ling the headers for my entire INBOX:

------------
java.net.SocketException: Connection reset by peer: socket write error
        at java.net.SocketOutputStream.socketWrite(Native Method)
        at java.net.SocketOutputStream.write(SocketOutputStream.java:87)
        at
org.w3c.jigsaw.http.socket.SocketOutputBuffer.write(SocketOutputBuffer.java:67)
        at java.io.DataOutputStream.write(DataOutputStream.java:92)
        at java.io.FilterOutputStream.write(FilterOutputStream.java:87)
        at
org.w3c.jigsaw.servlet.JigsawHttpServletResponse.flushStream(JigsawHttpServletResponse.java:451)
        at
org.w3c.jigsaw.servlet.ServletWrapper.service(ServletWrapper.java:268)
        at
org.w3c.jigsaw.servlet.ServletWrapperFrame.perform(ServletWrapperFrame.java:118)
        at
org.w3c.tools.resources.FramedResource.performFrames(FramedResource.java:615)
        at
org.w3c.tools.resources.FramedResource.perform(FramedResource.java:633)
        at org.w3c.jigsaw.http.httpd.perform(httpd.java:1589)
        at org.w3c.jigsaw.http.Client.processRequest(Client.java:384)
        at org.w3c.jigsaw.http.Client.startConnection(Client.java:459)
        at
org.w3c.jigsaw.http.socket.SocketClient.run(SocketClient.java:114)
        at org.w3c.util.CachedThread.run(ThreadCache.java:86)
------------

I'm sure some of my troubleshooting questions belong on
comp.lang.java.newbie.beatings.uglystick, as I'm still learning how to
handle exceptions, etc.  But where else am I going to find a combo of
Jigsaw/servlet people?  :o)  Thanks for the responses.

-- mike c



"Michael S. Zick" wrote:
> 
> Sounds like not only is the servlet code being kept from session to session
> (it is supposed to be) -- the string buffer is also being kept from session
> to session.
> Try forcing the issue by dropping the reference to the string buffer:
> //- - - - - - - - - - - - - - -
> > s.append("</BODY></HTML>\n");
> > r.setContentType("text/html");
> > r.setContentLength(s.length());
> > r.getOutputStream().print(s.toString());
> //- - - - - - - - - - - - - - -
>  s = null ;
> }
> 
> Mike

Received on Monday, 12 July 1999 03:38:36 UTC