if(category!=null&&category.getChilds().size()>0) {
PrintWriter pw = response.getWriter();
pw.write("0:请先删除子类!");
return;
}
gatewayService.deleteCategory(Long.parseLong(id));
List<Category> categorys = (List<Category>) getServletContext().getAttribute("categorys");
// categorys.clear();
// categorys.addAll(gatewayService.findAllCategory());
getServletContext().setAttribute("categorys", categorys);