响应-字节流:
response.setHeader("content-type", "text/html;charset=utf-8");
response.getOutputStream().write("中国".getBytes("utf-8"));
response.setContentType("text/html;charset=utf-8");
在静态页面中,使用<meta>来设置content-type响应头,例如:
<meta http-equiv="content-type" content="text/html; charset=UTF-8">
原文:http://www.cnblogs.com/d392110851/p/5050696.html