tomcat url 编码问题

来源:互联网 发布:mac 万能解码器 编辑:程序博客网 时间:2024/04/28 06:06

在tomcat下conf下的server.xml中的

<Connector port="8080" protocol="HTTP/1.1" 
               connectionTimeout="20000" 
               redirectPort="8443"/>

加上一句:URLEncoding="utf-8"


本体传递的值始终传到项目里面是乱码,原来tomcat对于传递的url都有一定得编码的。windows默认的是gbk。因此要修改