tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bugzi...@apache.org
Subject DO NOT REPLY [Bug 29342] New: - pageEncoding attribute is ignored under certain conditions
Date Wed, 02 Jun 2004 13:54:46 GMT
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG 
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://issues.apache.org/bugzilla/show_bug.cgi?id=29342>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND 
INSERTED IN THE BUG DATABASE.

http://issues.apache.org/bugzilla/show_bug.cgi?id=29342

pageEncoding attribute is ignored under certain conditions

           Summary: pageEncoding attribute is ignored under certain
                    conditions
           Product: Tomcat 5
           Version: 5.0.16
          Platform: PC
        OS/Version: Windows XP
            Status: NEW
          Severity: Normal
          Priority: Other
         Component: Jasper
        AssignedTo: tomcat-dev@jakarta.apache.org
        ReportedBy: mario.winterer@scch.at


If a single page directive is split into multiple instances (according to 
JSP.2.10.1 "The page Directive"), the "pageEncoding" attribute is ignored 
under the following conditions:
1) The page directive that contains the "pageEncoding" attribute is NOT 
defined in the same instance as the "contentType" attribute.
2) The page directive that contains the "pageEncoding" attribute appeares 
AFTER the directive that contains the contentType" attribute.

If both conditions are true, pageEncoding is ignored and instead, the 
character encoding specified by the "contentType" attribute seems to be used!

example 1:
<%@page contentType="text/html; charset=UTF-8"%>
<%@page pageEncoding="ISO-8859-1"%>

used charset: I don't know, but it is NOT ISO-8859-1, because special LATIN-1 
characters are "unreadable" in the generated java servlet code.

example 2:
<%@page pageEncoding="ISO-8859-1"%>
<%@page contentType="text/html; charset=UTF-8"%>

used charset: ISO-8859-1 (which is correct!)

At least it is a bug that the page directives are position dependent! (see 
JSP.2.10.1 "The page Directive").

---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-dev-help@jakarta.apache.org


Mime
View raw message