org.springframework.web.filter.charcterencodingfilter 帮我看看那里错了,怎么还有乱码 5

<context-param><param-name>contextConfigLocation</param-name><param-value>classpath*:... <context-param>
<param-name>contextConfigLocation</param-name>
<param-value>classpath*:spring/*.xml</param-value>
</context-param>
<!-- JSTL i18n定义-->
<context-param>
<param-name>javax.servlet.jsp.jstl.fmt.localizationContext</param-name>
<param-value>i18n/messages</param-value>
</context-param>
<context-param>
<param-name>jmesaPreferencesLocation</param-name>
<param-value>WEB-INF/jmesa.properties</param-value>
</context-param>
<!-- Character Encoding filter -->
<filter>
<filter-name>CharacterEncodingFilter</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>

<!-- FlashScope filter,在Flash中存储的数据,在下一次http请求中也可以继续引用,使用方法为Flash.current().error("存在错误"); -->
<filter>
<filter-name>FlashFilter</filter-name>
<filter-class>cn.org.rapid_framework.web.scope.FlashFilter</filter-class>
</filter>
<filter>
<filter-name>springSecurityFilterChain</filter-name>
<filter-class>org.springframework.web.filter.DelegatingFilterProxy</filter-class>
</filter>
<!-- LoggerMDCFilter,存放在MDC中的数据,log4j可以直接引用并作为日志信息打印出来. -->
<filter>
<filter-name>LoggerMDCFilter</filter-name>
<filter-class>javacommon.filter.LoggerMDCFilter</filter-class>
</filter>
<filter>
<filter-name>struts2-cleanup</filter-name>
<filter-class>org.apache.struts2.dispatcher.ActionContextCleanUp</filter-class>
</filter>
<filter>
<filter-name>struts2Filter</filter-name>
<filter-class>org.apache.struts2.dispatcher.ng.filter.StrutsPrepareAndExecuteFilter</filter-class>
</filter>
<filter-mapping>
<filter-name>CharacterEncodingFilter</filter-name>
<url-pattern>/*</url-pattern>
</filter-mapping>
<filter-mapping>
<filter-name>FlashFilter</filter-name>
<url-pattern>*.do</url-pattern>
</filter-mapping>
<filter-mapping>
<filter-name>springSecurityFilterChain</filter-name>
<url-pattern>/*</url-pattern>
</filter-mapping>
<filter-mapping>
<filter-name>LoggerMDCFilter</filter-name>
<url-pattern>/*</url-pattern>
</filter-mapping>
<filter-mapping>
<filter-name>struts2-cleanup</filter-name>
<url-pattern>*.do</url-pattern>
</filter-mapping>
<filter-mapping>
<filter-name>struts2Filter</filter-name>
<url-pattern>*.do</url-pattern>
</filter-mapping>
<filter-mapping>
<filter-name>struts2Filter</filter-name>
<url-pattern>*.js</url-pattern>
</filter-mapping>
展开
 我来答
kxlele
2011-08-30 · 超过20用户采纳过TA的回答
知道答主
回答量:76
采纳率:0%
帮助的人:40.1万
展开全部
什么地方乱码,得说清楚,如果是jsp页面乱码,则需要看jsp页面的字符集是否是utf-8,如果都是utf-8的话,是可以不用这个字符集过滤器的;
如果jsp页面是GBK/GB18030的话,这个过滤器应该配置成 GBK或者GB18030,如下配置:
<init-param>
<param-name>encoding</param-name>
<param-value>GBK</param-value>
</init-param>

需要根据实际情况哦,不要麻木尝试,需要理解
已赞过 已踩过<
你对这个回答的评价是?
评论 收起
推荐律师服务: 若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询

为你推荐:

下载百度知道APP,抢鲜体验
使用百度知道APP,立即抢鲜体验。你的手机镜头里或许有别人想知道的答案。
扫描二维码下载
×

类别

我们会通过消息、邮箱等方式尽快将举报结果通知您。

说明

0/200

提交
取消

辅 助

模 式