public void writerJson(List<Object> list) { String json = JSONArray.toJSONString(list); HttpServletResponse response = getResponse(); response.setContentType("application/json;charset=utf-8"); PRintWriter out = null; try { out = response.getWriter(); out.write(json); } catch (IOException e) { logger.error("BaseAction::writerJson catch exception:",e); } finally { if (out != null) out.close(); } }
新闻热点
疑难解答