public ActionForward tree_saveOrUpdate(
     ActionMapping mapping,
     ActionForm form,
     HttpServletRequest request,
     HttpServletResponse response)
     throws Exception {
   PrintWriter out = response.getWriter();
   Response res = new Response();
   try {
     Long id = Long.parseLong(request.getParameter("id"));
     Long pid = Long.parseLong(request.getParameter("pid"));
     String name = request.getParameter("name");
     Integer orderNo = Integer.parseInt(request.getParameter("orderNo"));
     service.tree_saveOrUpdate(id, pid, name, orderNo);
     res.setSuccess(true);
   } catch (Exception e) {
     res.setSuccess(false);
     e.printStackTrace();
     Logger.getRootLogger().error(e.getMessage());
   } finally {
     out.println(JSONObject.fromObject(res).toString());
     out.close();
   }
   return null;
 }
 public ActionForward MemberGroup_findAll(
     ActionMapping mapping,
     ActionForm form,
     HttpServletRequest request,
     HttpServletResponse response)
     throws Exception {
   PrintWriter out = response.getWriter();
   Response res = new Response();
   try {
     res.setData(service.MemberGroup_findAll().toString());
     res.setSuccess(true);
   } catch (Exception e) {
     res.setSuccess(false);
     e.printStackTrace();
     Logger.getRootLogger().error(e.getMessage());
   } finally {
     out.println(JSONObject.fromObject(res).toString());
     out.close();
   }
   return null;
 }
 public ActionForward td_saveOrUpdate(
     ActionMapping mapping,
     ActionForm form,
     HttpServletRequest request,
     HttpServletResponse response)
     throws Exception {
   PrintWriter out = response.getWriter();
   Response res = new Response();
   try {
     String data = request.getParameter("data");
     service.td_saveOrUpdate(JSONObject.fromObject(data));
     res.setSuccess(true);
   } catch (Exception e) {
     res.setSuccess(false);
     e.printStackTrace();
     Logger.getRootLogger().error(e.getMessage());
   } finally {
     out.println(JSONObject.fromObject(res).toString());
     out.close();
   }
   return null;
 }
 public ActionForward content_delete(
     ActionMapping mapping,
     ActionForm form,
     HttpServletRequest request,
     HttpServletResponse response)
     throws Exception {
   PrintWriter out = response.getWriter();
   Response res = new Response();
   try {
     Long id = Long.parseLong(request.getParameter("id"));
     service.content_delete(id);
     res.setSuccess(true);
   } catch (Exception e) {
     res.setSuccess(false);
     e.printStackTrace();
     Logger.getRootLogger().error(e.getMessage());
   } finally {
     out.println(JSONObject.fromObject(res).toString());
     out.close();
   }
   return null;
 }
 public ActionForward treeFld_saveOrUpdate(
     ActionMapping mapping,
     ActionForm form,
     HttpServletRequest request,
     HttpServletResponse response)
     throws Exception {
   PrintWriter out = response.getWriter();
   Response res = new Response();
   try {
     JSONArray array = JSONArray.fromObject(request.getParameter("data"));
     for (int i = 0, len = array.size(); i < len; i++) {
       service.treeFld_saveOrUpdate(array.getJSONObject(i));
     }
     res.setSuccess(true);
   } catch (Exception e) {
     res.setSuccess(false);
     e.printStackTrace();
     Logger.getRootLogger().error(e.getMessage());
   } finally {
     out.println(JSONObject.fromObject(res).toString());
     out.close();
   }
   return null;
 }