post请求处理乱码
request.setCharacterEncoding(UTF-1);
response.setContentType("text/html;charset=utf-8);
get 请求处理乱码,在tomcat中的conf目录下的server.xml中添加URIEncoding="UTF-8"
<Connector connectionTimeout="20000" port="8080" protocol="HTTP/1.1" redirectPort="8443" URIEncoding="UTF-8"/>
怕什么真理无穷 进一寸有一寸的欢喜