-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 André,
André Warnier wrote: > - the only viable solution in my case is thus to make sure that the > Tomcat servlet issues the correct Content-Type header in the first > place. If the servlet itself cannot be modified, then a servlet filter > wrapping the response in a javax.servlet.ServletResponseWrapper wrapper > would be the way to go. The wrapper should override the methods by > which the servlet sets and/or obtains the response encoding. Note that this is a very common use case for filters: wrap the request (or, in this case, the response) with a custom object that extends ServletRequestWrapper (or ServletResponseWrapper) and overrides the appropriate methods, then delegate processing to the next processor in the filter chain. You probably want to use HttpServletResponseWrapper in stead of the more generic wrapper class. > (In my case, the servlet has to "keep believing" that its response > output stream is iso-8859-1, otherwise it does the wrong charset > translations from its internal Unicode strings to the 8-bit response > stream.) That's a pretty significant bug! - -chris -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.9 (MingW32) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org iEYEARECAAYFAklr5g4ACgkQ9CaO5/Lv0PA8sACgpmv/U0O/DsFHvow33QllQeIF VxkAoILFKW+1R1ljGegbVQAWNutNlyDE =WrCw -----END PGP SIGNATURE----- --------------------------------------------------------------------- To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org