把list打成JSSON数组

TreeBiz tb = new TreeBiz();
   List<Tree> list = tb.selAll();
   JSONArray json = JSONArray.fromObject(list);
   request.setAttribute("json",json);
   request.getRequestDispatcher("index2.jsp").forward(request, response);

传到下一个页面

var     zJONE  =  s{json};
  

posted @ 2018-09-01 11:43  砥砺奋进的几年  阅读(459)  评论(0编辑  收藏  举报