请求:对于get和post都有效果
request.setCharacterEncoding("UTF-8");
相应:
设置服务器输出的编码为UTF-8
response.setCharacterEncoding("UTF-8");
或者:
response.setContentType("text/html; charset=utf-8");
request.setCharacterEncoding("UTF-8");
response.setCharacterEncoding("UTF-8");
或者:
response.setContentType("text/html; charset=utf-8");