日期:2014-05-16 浏览次数:20720 次
<filter> <filter-name>SetCharacterEncodingFilter</filter-name> <filter-class>eoffice.servlet.SetCharacterEncodingFilter</filter-class> <init-param> <param-name>encoding</param-name> <param-value>GBK</param-value> </init-param> </filter>
、 JSONArray resultList=JSONArray.fromObject(innerArticleColumnList); response.setContentType("text/json;charset=GBK"); response.setHeader("Cache-Control", "no-cache"); out.print(resultList.toString());
out=response.getWriter(); //输出中文,这一句一定要放到response.setContentType("text/xml;charset=utf-8"), response.setHeader("Cache-Control", "no-cache")后面,否则中文返回到页面是乱码