resp.setContentType("text/html;charset=UTF-8");//设置浏览器的编码格式 req.setCharacterEncoding("utf-8"); resp.setCharacterEncoding("utf-8");