Bug 46564

Summary: .tagx files don't compile if the document and page encoding casing differs
Product: Tomcat 6 Reporter: Daan Kets <daan.kets>
Component: JasperAssignee: Tomcat Developers Mailing List <dev>
Status: RESOLVED FIXED    
Severity: normal    
Priority: P3    
Version: 6.0.18   
Target Milestone: default   
Hardware: PC   
OS: Windows XP   

Description Daan Kets 2009-01-20 00:34:11 UTC
Jasper will raise an error like

/WEB-INF/tags/sampletaglib/sampletag.tagx(3,99) Page-encoding specified in XML prolog (iso-8859-1) is different from that specified in page directive (ISO-8859-1)

if the encoding specified within the XML prolog and the page directive use different casing:

<?xml version="1.0" encoding="iso-8859-1"?>
<jsp:root xmlns:jsp="http://java.sun.com/JSP/Page" version="2.0">
    <jsp:directive.tag display-name="sampletag" pageEncoding="ISO-8859-1" />

    This is a sample tag!
</jsp:root>


Proposed solution: Compare the encodings case-insensitive. For example:

iso-8859-1 and ISO-8859-1 are both valid identifiers for the same encoding.
Comment 1 Mark Thomas 2009-01-29 21:32:16 UTC
Looks like I missed a case when I fixed 44986. Trunk has been fixed and the patch proposed for 6.0.x
Comment 2 Mark Thomas 2009-02-12 06:48:46 UTC
This has been fixed in 6.0.x and will be included in 6.0.19 onwards.