Response乱码的解决方法

protected void doPost(HttpServletRequest request, HttpServletResponse response)   
  
    throws ServletException, IOException {  
//告诉servlet用UTF-8转码 request.setCharacterEncoding("UTF-8"); response.setCharacterEncoding("UTF-8");
//浏览器用utf8来解析返回的数据  response.setContentType("text/html; charset=UTF-8"); }

  

posted @ 2016-11-30 20:45  kangjie  阅读(674)  评论(0编辑  收藏  举报