大家好,我想请问下,我的web.xml里面设置了请求编码方式为gbk 页面也是gbk 为啥中文传到后台还是乱码
web.xml的配置
<filter>
<filter-name>encodingFilter</filter-name>
<filter-class>
org.springframework.web.filter.CharacterEncodingFilter
</filter-class>
<init-param>
<param-name>encoding</param-name>
<param-value>GBK</param-value>
</init-param>
</filter>
页面设置
<%@ page contentType="text/html; charset=GBK"%>
<html>
<%@ include file="/common/taglibs.jsp"%>
<head>
struts设置
<!-- 国际化信息内码 -->
<constant name="struts.i18n.encoding" value="GBK" />
为啥传到后台的中文,却需要utf-8才能不乱码呢,,请问下,这是为什么,,有人知道吗?求解决!!弄几个小时了,怎么转码都不行