Thanks Mark! Here it is: https://bz.apache.org/bugzilla/show_bug.cgi?id=60769
On Tue, Feb 21, 2017 at 9:49 PM, Mark Thomas <ma...@apache.org> wrote: > On 18/02/2017 16:32, Lazar Kirchev wrote: > > I noticed something else strange. If in an jspx file I declare one and > > the same encoding (in my case Windows-1252) in both the XML prolog and > > the page directive pageEncoding property, on Tomcat 8.5.11 I get the > > error message: > > "Page-encoding specified in XML prolog (UTF-8) is different from that > > specified in page directive (WINDOWS-1252)", while on older Tomcat 8.5 I > > get no error and the page is displayed. > > > > I attach the sample1.war with this jspx file. > > Please open a bugzilla issue for this. > > I suspect that there is a BoM present and that is causing the behaviour > you see. > > Mark > > > > Kind regards, > > Lazar > > > > On Sat, Feb 18, 2017 at 4:48 PM, Lazar Kirchev <lazar.kirc...@gmail.com > > <mailto:lazar.kirc...@gmail.com>> wrote: > > > > 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 > > <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 > > > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org > For additional commands, e-mail: users-h...@tomcat.apache.org > >