Several people mentioned in the past the 'socket write error' that happens
when using standalone Tomcat and IE. We also encountered this problem and
here are our findings, some of them based on facts and some are assumptions.

Basically, the problem occurs because IE is smarter than the Tomcat's
built-in web server. If the browser already has a given file in cache, then
next time it needs it, it lets Tomcat know that it already has that version
of the file (using the HTTP 'if-modified-since' header). Tomcat in turn is
expected to check that the file has not been modified and if so, return a
304 status (SC_NOT_MODIFIED). This behavior reduces the traffic and improves
the performance. However, Tomcat's built-in server does not support the 304
status code and simply resends the entire file. When IE starts to get the
headers and the file data, it determines that the file has not been changed,
drops the connection, and uses the value from the cache. On Tomcat's side,
this causes an exception (when it try to send the next chunk of the file)
and an error message. The error messages seems to be displayed by Tomcat
only when sending the file from a servlet, and is ignored when Tomcat's
itself sends a static file.


Fixes

1. It would be nice to have support for 304 code by Tomcat static file
server. This will improve the performance.

2. If you send files from your servlet, add support for 304 status code.
That is, if the header 'if-modified-since' is found in the request, get its
date, compare it to the actual date of the file, if the file has not been
changed, send SC_NOT_MODIFIED status.

Tal


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, email: [EMAIL PROTECTED]

Reply via email to