日期:2014-05-17  浏览次数:20728 次

struts2中URL传递中文参数乱码问题
我刚用struts2.0 在struts.xml中加入<constant name="struts.i18n.encoding" value="GB2312"></constant>后可以解决FORM表单中提交中文参数出现乱码的问题。。
但是不能解决URL传递中文参数(比如hello.action?msg=哈哈之类)出现乱码的问题
希望高手给出解决的方法。小弟在此先谢过了。。
在线等待中。。。。

------解决方案--------------------
修改 tomcat/conf/server.xml
<Connector acceptCount='100' connectionTimeout='20000' debug='0'
disableUploadTimeout='true' enableLookups='false'
maxSpareThreads='75' maxThreads='150' minSpareThreads='25'
port='8080' redirectPort='8443' URIEncoding='GBK'/>


加上 URIEncoding='GBK' 即可。

------解决方案--------------------
http://blog.csdn.net/feng_sundy/archive/2005/11/15/529944.aspx

不知道这个网址对你有没有帮助,里面讲乱码问题讲的很详细