post:
在Servlet类中第一行加上下面这句:
request.setCharacterEncoding("UTF-8");
get:
tomcat7:
配置文件路径:E:\Program Files\apache-tomcat-8.0.48\conf\server.xml
<Connector connectionTimerout="2000" port="8080" protocol="HTTP/1.1" redirectPort="8443" URIEncoding="UTF-8"/>
tomcat8:
无需处理