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"/>

 

posted on 2016-12-05 01:33  程英俊  阅读(108)  评论(0编辑  收藏  举报