使用struts2 web.xml用配置字符集过滤器么
2016-08-28
展开全部
<filter>
<filter-name>filterConfig</filter-name>
<!-- 一定不是com.javaTest.filter.Charset_filter.java,不要加.java,否则返回404错误,根本打不开页面 -->
<filter-class>com.javaTest.filter.Charset_filter</filter-class>
<init-param>
<param-name>encoding</param-name>
<param-value>UTF-8</param-value>
</init-param>
</filter>
<filter-mapping>
<filter-name>filterConfig</filter-name>
<url-pattern>*.jsp</url-pattern>
</filter-mapping>
<filter-name>filterConfig</filter-name>
<!-- 一定不是com.javaTest.filter.Charset_filter.java,不要加.java,否则返回404错误,根本打不开页面 -->
<filter-class>com.javaTest.filter.Charset_filter</filter-class>
<init-param>
<param-name>encoding</param-name>
<param-value>UTF-8</param-value>
</init-param>
</filter>
<filter-mapping>
<filter-name>filterConfig</filter-name>
<url-pattern>*.jsp</url-pattern>
</filter-mapping>
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询