方法一:设置response的header为utf-8编码
protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
response.setHeader("content-type","text/html;charset=UTF-8");
PrintWriter writer = response.getWriter();
writer.write("3333344445553故人西辞黄鹤楼");
}
方法二:myeclipse中,window=》preferences=》general=》workspace 设置text file encoding 为other UTF-8