All,

I'm experiencing irregularities with Tomcat serving JavaScript and HTML files on a certain platform, various Google searches and tricks haven't managed to change the behavior.

This behavior has been confirmed on 5.0.28, 5.5.15 and 5.5.15, all running on JDK 1.5.05-b05, SUSE 10. I've also confirmed the behavior on SLES 9. The same file being served from Apache on the same server is served properly. Additionally, the same webapp serves fine from Windows 2003 leading me to believe this is some how an OS issue.

Specifically, our webapps have static content in the form of several JavaScript files, these files in turn have multi-byte characters. When Tomcat serves the files, the ContentLength header is correct, however Tomcat is not writing all the characters to the response stream. For a particular file for example, the number of bytes is always 10 short of the ContentLength. Note that it seems Tomcat has recognized the multi-byte encoding, the ContentLength header is correct; it's simply not writing all the characters to the response stream or they aren't being flushed.

The behavior is consistent and repeatable, I'd be happy to produce our test file if it would help.

After searching Bugzilla, this list and numerous Google results I can also confirm that:

1) Not using APR, sendfile should not be an issue
2) My locale is set: "export LC_ALL=en_US.utf8"
3) File encoding is set for the JDK: "-Dfile.encoding=UTF-8"
4) contextDefaultEncoding is set to "UTF-8" in the global web.xml
5) I've created a Filter to explicitly set the type as per: http://wiki.apache.org/tomcat/Tomcat/UTF-8

The problem is persisting despite all these steps. The logs don't indicate anything out of the ordinary.

Any help would be appreciated.

-erik

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

Reply via email to