使用 String 进行重新编码: uname=new String(uname.getBytes("iso8859-1"),"utf-8"); Get 方式请求: 在 service 方法中使用: req.setCharacterEncoding(“utf-8”); 在 tomcat 服务器目录下的 conf 文件下找到 server.xml 文件,打开进行配置 Post 方式请求: 在 service 方法中使用: req.setCharacterEncoding(“utf-8”);