1、进入tomcat安装路径----
包含tomcat的安装目录/conf目录/server.xml文件
连接连接时间=' 20000 '端口=' 8080 '协议=' http/1.1 ' redirect port=' 8443 ' /
修改如下。
connectoruriencoding=' utf-8 ' connection time out=' 20000 ' port=' 8080 ' protocol=' http/1.1 ' redirect port=' 8400
或者
connectoruriencoding=' utf-8 ' allow trace=' false ' connection time out=' 2000 ' maxkeepaliverequests='1' max threads
加入uri编码=' utf-8 '
2、进入eclipse中的Service文件夹,进入tomcat目录。 打开service.xml
将
连接连接时间=' 20000 '端口=' 8080 '协议=' http/1.1 ' redirect port=' 8443 ' /
修改如下。
connectoruriencoding=' utf-8 ' connection time out=' 20000 ' port=' 8080 ' protocol=' http/1.1 ' redirect port=' 8400
或者
connectoruriencoding=' utf-8 ' allow trace=' false ' connection time out=' 2000 ' maxkeepaliverequests='1' max threads
加入uri编码=' utf-8 '
实际上,这两种方法的效果都相同,只要在eclipse中进行修改,然后重新启动tomcat,它们就会自动同步到安装目录下的service.xml文件中