解决方法是在response.getWriter()前加上response.setContentType("text/html; charset=UTF-8");
//response.setCharacterEncoding("utf-8");单纯的这么设置一样有乱码
正确做法:
response.setContentType("text/html; charset=UTF-8"); response.getWriter();
解决方法是在response.getWriter()前加上response.setContentType("text/html; charset=UTF-8");
//response.setCharacterEncoding("utf-8");单纯的这么设置一样有乱码
正确做法:
response.setContentType("text/html; charset=UTF-8"); response.getWriter();