post request
Request packet body
request.setCharacterEncoding("utf-8");
get request
Request url addresses
Method 1: configure port disposed in place tomcat conf directory URIEncoding="UTF-8"
to
Method 2:
acquired request parameters to the original coding method is broken
then the utf-8
String name = request.getParameter("name");
byte[] bytes = name.getBytes("ISO8859-1");
name=new String(bytes, "utf-8");