在传值过程中,经常会碰到中文乱码的问题,处理我上篇文章中在web.xml中加入过滤器之外,还有一种更彻底的方法:
配置tomcat目录下的service.xml文件
tomcat7/conf/server.xml
给该行代码加上 URIEncoding=”UTF-8” 的编码属性
<Connector port="8080" protocol="HTTP/1.1"
connectionTimeout="20000"
redirectPort="8443" URIEncoding="UTF-8"/>