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");
}
原文:http://www.cnblogs.com/taiguyiba/p/6119595.html