1. 对于post参数,可以用filter来处理,在dofilter之前,加入以下代码:
request.setCharacterEncoding("UTF-8");
2. 对于get参数,直接修改tomcat的conf/server.xml配置来完成:
<Connector port="" protocol="HTTP/1.1"
connectionTimeout=""
redirectPort="" URIEncoding="UTF-8" />
参考资料:
http://blog.csdn.net/hongqishi/article/details/7428380