天天看点

html句末中文乱码,且报:ERR_CONTENT_LENGTH_MISMATCH

版权属于:CharlesSong's Blog

原文地址:http://www.changeself.net/archives/failed-to-load-resource-neterr_content_length_mismatch.html

现在的jeesite框架项目,在创建html文件后,发现个别中文有乱码(一般是句子末尾),而且浏览器报错:net::ERR_CONTENT_LENGTH_MISMATCH,经过各种百度,发现是web.xml里面没有配置,增加下列配置即可:

<jsp-config>             <jsp-property-group>                 <description>                     Special property group for JSP Configuration JSP 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>