摘要:
HttpServletResponse response = ServletActionContext.getResponse(); response.setCharacterEncoding("utf-8"); response.setContentType("text/xml;charset=utf-8"); response.setHeader("Cache-Control", "no-cache"); //确保在取得PrintWriter对象之前先设置response的编码;顺序搞错将无法解决中文乱码问题! 阅读全文