Page-encoding specified in XML prolog (UTF-8) is different from that specified in page directive (utf-8)

时间:2023-01-15 10:27:52
 

    把一个Web应用从Tomcat-5.0.28移植部署到Tomcat-6.0.16后,访问页面报错:

    org.apache.jasper.JasperException:
    /default/header.jsp(1,1) Page-encoding specified in XML prolog (UTF-8) is different from that specified in page directive (utf-8)


    难道Tomcat6的编码校验有问题?在Tomcat5下面是没有问题的。


    打开header.jsp后,发现如下写法:

    <%@ page language="java"  pageEncoding="utf-8"%>



    把小写的"utf-8"改为大写的"UFT-8":

    <%@ page language="java"  pageEncoding="UFT-8"%>


    保存后,再次访问,一切正常了。



                                        2008/12/25 于南昌