关于setCharacterEncoding部分设置

1、pageEncoding="UTF-8"的作用是设置JSP编译成Servlet时使用的编码。 
2、contentType="text/html;charset=UTF-8"的作用是指定对服务器响应进行重新编码的编码。 
3、request.setCharacterEncoding("UTF-8")的作用是设置对客户端请求进行重新编码的编码。
4、response.setCharacterEncoding("UTF-8")的作用是指定对服务器响应进行重新编码的编码。

 

参考文章

https://blog.csdn.net/fancylovejava/article/details/7700683

posted @ 2023-02-06 21:49  stytem  阅读(52)  评论(0)    收藏  举报