漂亮男人2017-05-17 10:02:32
1.tomcat的server.xml配置
<Connector port="8080" protocol="HTTP/1.1"
connectionTimeout="20000"
redirectPort="8443"
URIEncoding="UTF-8"
useBodyEncodingForURI="true"
/>
2.继承HttpServletRequestWrapper重写getParameter方法,在这个方法里面做字符串的编码转换