Bug 46564 - .tagx files don't compile if the document and page encoding casing differs
Summary: .tagx files don't compile if the document and page encoding casing differs
Alias: None
Product: Tomcat 6
Classification: Unclassified
Component: Jasper (show other bugs)
Version: 6.0.18
Hardware: PC Windows XP
: P3 normal (vote)
Target Milestone: default
Assignee: Tomcat Developers Mailing List
Depends on:
Reported: 2009-01-20 00:34 UTC by Daan Kets
Modified: 2009-02-12 06:48 UTC (History)
0 users


Note You need to log in before you can comment on or make changes to this bug.
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!

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.