1.action中获取到数据
@Override public String execute() throws Exception { Listfind = echartsService.find(); Gson g = new Gson(); String list = g.toJson(find); ServletActionContext.getResponse().setCharacterEncoding("UTF-8"); ServletActionContext.getResponse().getWriter().write(list); System.out.println(list); return NONE; }
2.jsp页面应用echarts
3.准备一个具有宽高的容器(必须有宽高)
4.效果