1.打開tomcat下面的server.xml文件java
2.將xml文件中大概在65行左右的內容增長兩句話tomcat
<Connector URLEncoding="UTF-8" useBodyEncodingForURI="true" port="8080" protocol="HTTP/1.1" connectionTimeout="20000" redirectPort="8443" />
3.後臺增長代碼(必定要將其放在最前面)3d
HttpServletRequest request = ServletActionContext.getRequest(); request.setCharacterEncoding("utf-8");
問題就解決啦code