GET方式传中文参数给Struts2 Action时出现乱码
在tomcat的server.xml加上 URIEncoding="UTF-8"
?
如下:
?
?
<Connector port="8080" protocol="HTTP/1.1"?
? ? ? ? ? ? ? ?connectionTimeout="20000"?
? ? ? ? ? ? ? ?redirectPort="8443" URIEncoding="UTF-8"/>
发布时间: 2012-08-14 10:39:57 作者: rapoo
GET方式传中文参数给Struts2 Action时出现乱码
在tomcat的server.xml加上 URIEncoding="UTF-8"
?
如下:
?
?
<Connector port="8080" protocol="HTTP/1.1"?
? ? ? ? ? ? ? ?connectionTimeout="20000"?
? ? ? ? ? ? ? ?redirectPort="8443" URIEncoding="UTF-8"/>