java后台:response.getwriter().write 乱码解决

在response.getwriter().write的上面需要设置:

response.setContentType(“text/html; charset=utf-8”); html 
response.setContentType(“text/plain; charset=utf-8”); 文本 
response.setContentType(“text/JavaScript; charset=utf-8”); json数据 
response.setContentType(“application/xml; charset=utf-8”); xml数据

发布了92 篇原创文章 · 获赞 3 · 访问量 5168

猜你喜欢

转载自blog.csdn.net/qq_22049773/article/details/102899308