1 . request.setCharacterEncoding("utf-8");
只适合Post方法提交的数据,
2 . 适合用Get方法提交的数据
String name = request.getParameter("name");
name=new String(name.getBytes(“ISO8859_1”),“UTF-8”);
3 .
针对Tomcat服务器,修改server.xml
<Connector port="8083" protocol="HTTP/1.1"
connectionTimeout="20000"
redirectPort="8443"
URIEncoding="UTF-8" />
这个只使用GET方法,不适合Post方法