json

Gson gson = new Gson();
String result = gson.toJson(ganteList);
HttpServletResponse response = ServletActionContext.getResponse();
response.setContentType("text/plain; charset=utf-8");
response.setHeader("Cache-Control", "no-cache");
PrintWriter out = response.getWriter();
out.print(result);
out.flush();
out.close();
System.out.println(result);
return null;

你可能感兴趣的:(json,cache)