解决jsp的include html文件出现乱码的情况

html文件里面必须添加head标签并且添加如下内容

<head>

<metahttp-equiv="Content-Type"content="text/html;charset=UTF-8"/>

</head>

或者在web.xml里面添加

<jsp-config>

<jsp-property-group>

<description>

SpecialpropertygroupforJSPConfigurationHTML

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>

相关推荐