This also applies to other versions of Tomcat. List the JSP files: osipovmi@deblndw011x:~/var/Projekte/tomcat (main *=) $ find webapps/manager -name \*.jsp webapps/manager/WEB-INF/jsp/401.jsp webapps/manager/WEB-INF/jsp/403.jsp webapps/manager/WEB-INF/jsp/404.jsp webapps/manager/WEB-INF/jsp/sessionDetail.jsp webapps/manager/WEB-INF/jsp/sessionsList.jsp webapps/manager/WEB-INF/jsp/connectorCerts.jsp webapps/manager/WEB-INF/jsp/connectorCiphers.jsp webapps/manager/WEB-INF/jsp/connectorTrustedCerts.jsp webapps/manager/index.jsp and open them. Many have the XML prolog set "<?xml version="1.0" encoding="UTF-8"?>", but set the output encoding to <%@page session="false" contentType="text/html; charset=ISO-8859-1" %> <meta http-equiv="content-type" content="text/html; charset=iso-8859-1"/> This is weird and it should be consistently one encoding, the prolog and those JSP/HTML tags.
As far as I understand they should not contain an XML prolog at all since they aren't JSPX
I've fixed the encoding declaration in 11402a58acfde441d947332c4a6f110a24658efd in main and back-ported to the other versions. I'm not going to remove any of the XML stuff at this point, since the page also declares that is it XHTML. I'm not sure that .jsp versus .jspx has anything to do with it, as any file processed by the JSP engine can produce output of any kind, only identified by its Content-Type.
For the record, Chris is correct. The JSP prologue and pageEncoding MUST agree for JSP documents in XML syntax. For JSP pages that are not in XML syntax, the prologue is just template text that will be passed through to the output.
(In reply to Mark Thomas from comment #3) > The JSP prologue and pageEncoding MUST agree for JSP documents in XML syntax. s/pageEncoding/contentType/? pageEncoding specifies the encoding of the source document (.jsp file) but the response. But maybe they also have to agree?