Looking into bug 37072 has identified a conflict in the spec. http://issues.apache.org/bugzilla/show_bug.cgi?id=37072
Consider the following sequence of calls: response.setCharacterEncoding("UTF-8"); response.getWriter(); response.reset(); After this the writer encoding and response encoding do not agree and can not be reconciled: - the Writer is using UTF-8 because the reset only clears the buffer, it doesn't reset the writer's encoding - response.getCharacterEncoding returns ISO-8859-1 due to the reset - response.setCharacterEncoding has no effect since the getWriter() call sets the usingWriter flag that prevents changes to the character encoding. The spec is clear that: - reset() clear all the headers - calls setCharacterEncoding() have no effect after getWriter() What isn't clear is should the call to reset() also clear the writer (assuming of course that the response isn't committed)? Along the same lines is getWriter(), reset(), getStream() be legal? I am minded to clear the writer, buffer, stream and associated flags on reset(). Thoughts? Mark --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]