servlet输出中文乱码(问号)解决

在get和post方法里加上以下代码把request和response编码格式改为utf-8:

request.setCharacterEncoding(“utf-8”);
response.setContentType(“text/html;charset=utf-8”);
response.setCharacterEncoding(“utf-8”);

猜你喜欢

转载自blog.csdn.net/qq_42862882/article/details/86301040