Hello,

According to the JSP 2.3 spec,
section 3.3.4 (Declaring page encodings):
"It is also a translation-time error to name different encodings in the
prolog / text declaration of the document in XML syntax and in a JSP
configuration element matching the document. It is legal to name the same
encoding through multiple mechanisms."

and in

section 4.1.2 (XML Syntax):
"It is a translation-time error to name different encodings in two or more
of the following: the XML prolog / text declaration of a JSP document, the
pageEncoding attribute of the page directive of the JSP document, and in a
JSP configuration element whose URL pattern matches the document."

However, on Tomcat 8.5.11 the attached sample.war, which declares UTF-8
encoding through a configuration element and Windows-1252 with the XML
prolog of a .jspx file, does not throw an exception and displays the jspx.
But it works as expected for the index.jsp, which declares again a
different encoding from the one declared through JSP configuration in
web.xml.

On older versions of Tomcat 8.5 both requests fail as expected. This is
probably due to change

https://github.com/apache/tomcat85/commit/a03c5755a6fa2d9daa43abe357628f475230fdb2
?


Regards,

Lazar
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org

Reply via email to