天天看點

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>