HttpServletResponse防止乱码

response.setContentType("text/html");//内容类型,解析为javascript代码或html代码
response.setCharacterEncoding("utf-8");//内容编码,防止出现中文乱码
response.getWriter().write("你的内容");

Last modification:September 20th, 2019 at 11:07 pm
If you think my article is useful to you, please feel free to appreciate

Leave a Comment