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