C
Craig Lindley
Hi,
I've written a small HTTP server that also handles servlets. It works
perfectly fine for files and almost perfectly fine for servlets. The
strange problem that occurs with servlets is as follows:
The servlet runs fine, fills the PrintWriter (backed onto a
ByteArrayOutputStream) fine, I output the HTTP header to the socket
(Internet Explorer) flush it, then write the body of the servlet. This
seems to work fine for smaller servlets, but as soon as the servlet outputs
a larger amount of data it gives a 90% "page cannot be displayed" message.
The REALLY strange thing is, if I wait 50ms or so after flushing the streams
and before I close the socket, all works fine. Although on one machine the
50ms delay had to be cranked upto 1000ms before it didn't "page cannot be
displayed".
ANY and all ideas welcome!!!
Thanks,
Craig.
I've written a small HTTP server that also handles servlets. It works
perfectly fine for files and almost perfectly fine for servlets. The
strange problem that occurs with servlets is as follows:
The servlet runs fine, fills the PrintWriter (backed onto a
ByteArrayOutputStream) fine, I output the HTTP header to the socket
(Internet Explorer) flush it, then write the body of the servlet. This
seems to work fine for smaller servlets, but as soon as the servlet outputs
a larger amount of data it gives a 90% "page cannot be displayed" message.
The REALLY strange thing is, if I wait 50ms or so after flushing the streams
and before I close the socket, all works fine. Although on one machine the
50ms delay had to be cranked upto 1000ms before it didn't "page cannot be
displayed".
ANY and all ideas welcome!!!
Thanks,
Craig.