在web.xml中添加编码过滤器仍不能解决乱码。
在tomcat安装目录的conf/server.xml中修改配置如下:
<Connector URIEncoding="UTF-8" port="8080" protocol="HTTP/1.1"
connectionTimeout="20000"
redirectPort="8443" />
如果是eclipse环境,要在Servers项目下的tomcat目录下找到server.xml修改,才能生效。

标签: Tomcat, 汉字乱码

评论已关闭