报错:Page-encoding specified in jsp-property-group (utf-8) is different from that specified in page directive (gbk)
页面的pageEncoding设置和web.xml中的jsp-property-group的pageEncoding属性设置不一致引起的。
jsp或者html页面设置了<%@page pageEncoding="gbk"%>
但是web.xml中:
<jsp-config>
<jsp-property-group>
<description>
Special property group for JSP Configuration HTML
example.
</description>
<display-name>JSPConfiguration</display-name>
<url-pattern>*.html</url-pattern>
<el-ignored>true</el-ignored>
<page-encoding>utf-8</page-encoding>
<scripting-invalid>false</scripting-invalid>
<include-prelude></include-prelude>
<include-coda></include-coda>
</jsp-property-group>
</jsp-config>
解决方法:两处更改一致即可,如果更改web.xml,需要重启哦
页面的pageEncoding设置和web.xml中的jsp-property-group的pageEncoding属性设置不一致引起的。
jsp或者html页面设置了<%@page pageEncoding="gbk"%>
但是web.xml中:
<jsp-config>
<jsp-property-group>
<description>
Special property group for JSP Configuration HTML
example.
</description>
<display-name>JSPConfiguration</display-name>
<url-pattern>*.html</url-pattern>
<el-ignored>true</el-ignored>
<page-encoding>utf-8</page-encoding>
<scripting-invalid>false</scripting-invalid>
<include-prelude></include-prelude>
<include-coda></include-coda>
</jsp-property-group>
</jsp-config>
解决方法:两处更改一致即可,如果更改web.xml,需要重启哦