Tomcat中配置URIEncoding="UTF-8"来处理中文的方法

时间:2021-06-24 14:29:15

http://www.cnblogs.com/seabird1979/p/4837237.html
Tomcat中配置URIEncoding="UTF-8"来处理中文的处理
打开 server.xml 文件,更改两个地方。

配置一:添加 URIEncoding="UTF-8"

<Connector URIEncoding="UTF-8" connectionTimeout="20000" port="8081" protocol="HTTP/1.1" redirectPort="8443"/>

配置二:添加 URIEncoding="UTF-8"

<Connector URIEncoding="UTF-8" port="8009" protocol="AJP/1.3" redirectPort="8443"/>

配置后重启tomcat。