可能的一种原因是tomcat未开启UTF-8编码
查看$TOMCAT_HOME/webapps/tomcat-docs/config/http.html这个说明文档,有如下说明:
URIEncoding:This specifies the character encoding used to decode the URI bytes, after %xx decoding the URL. If not specified, ISO-8859-1 will be used.
也就是说,如果没有设置URIEncoding, Tomcat默认是按ISO-8859-1进行URL解码,ISO-8859-1并未包括中文字符,这样的话中文字符肯定就不能被正确解析了。
解决方法:
修改Tomcat的Server.xml,在Connector标签中加上URIEncoding="UTF-8"