FreeMarker
<#include "/head.html" parse=false encoding="UTF-8">
JSP
<%@ include file=” ”%>
<jsp:include page=” ” flush=”true”/>
出现乱码有解决方法,在web.xml下作如下配置:
<jsp-config>
<jsp-property-group>
<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>

本文探讨了FreeMarker模板语言和JSP中遇到的字符编码问题,特别是如何解决UTF-8编码导致的乱码问题,并给出了在web.xml中配置正确的页面编码方式。
161

被折叠的 条评论
为什么被折叠?



