兩步驟搞定:tomcat
1,修改tomcat的server.xml編碼
<Connector port="8080" protocol="HTTP/1.1" connectionTimeout="20000" redirectPort="8443"/>server
增長字段 useBodyEncodingForURI="true" URIEncoding="UTF-8"xml
2,servlet 中設置編碼方式servlet
request.setCharacterEncoding(Encodings.UTF8.value);io