tomcat8设置编码: post请求: req.setCharacterEncoding("UTF-8"); 注意:设置编码必须在所有的获取参数前 get请求:tomcat8之前需要设置,8之后指着对post请求进行设置