工程编码过滤器

<!-- 编码过滤器 -->
<filter>
<filter-name>encodingFileter</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>
</filter>
<filter-mapping>
<filter-name>encodingFileter</filter-name>
<url-pattern>/*</url-pattern>
</filter-mapping>

<!-- Struts过滤器 -->
<filter>
<filter-name>Struts</filter-name>
<filter-class>org.apache.struts2.dispatcher.ng.filter.StrutsPrepareAndExecuteFilter</filter-class>
</filter>
<filter-mapping>
<filter-name>Struts</filter-name>
<url-pattern>*.action</url-pattern>
</filter-mapping>

<!-- Spring监听器 -->
<context-param>
<param-name>contextConfigLocation</param-name>
<param-value>classpath:applicationContext.xml</param-value>
</context-param>
<listener>
<listener-class>org.springframework.web.context.ContextLoaderListener</listener-class>
</listener>

posted @ 2017-10-28 22:07  王玉峰1102  阅读(158)  评论(0编辑  收藏  举报