<!--
设置字符串过滤器,解决表单
Post
提交中的乱码问题
-->
<filter>
<filter-name>characterEncoding</filter-name>
<filter-class>org.springframework.web.filter.CharacterEncodingFilter</filter-class>
<init-param>
<param-name>encoding</param-name>
<param-value>utf-8</param-value>
</init-param>
<init-param>
<param-name>forceEncoding</param-name>
<param-value>true</param-value>
</init-param>
</filter>
<filter-mapping>
<filter-name>characterEncoding</filter-name>
<url-pattern>/*</url-pattern>
</filter-mapping>
<!--
设置
jsp,htm,html
页面的字符集,是否使用标签,是否使用
jsp
脚本等,头尾载入页面等
-->
<jsp-config>
<jsp-property-group>
<description>
指定
JSP
文件的配置属性
</description>
<display-name>jspConfiguration</display-name>
<url-pattern>*.jsp</url-pattern>
<el-ignored>false</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-property-group>
<description>
指定
htm
文件的配置属性
</description>
<display-name>jspConfiguration</display-name>
<url-pattern>*.htm</url-pattern>
<el-ignored>false</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-property-group>
<description>
指定
html
文件的配置属性
</description>
<display-name>jspConfiguration</display-name>
<url-pattern>*.html</url-pattern>
<el-ignored>false</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>
|