ServletRequestrequest,HttpServletResponseresponse) throwsException{ CategoryFormcf=(CategoryForm)form; //判断id是否有效 if(cf.getId()>0){ CategoryDaodao=newCategoryDao(); Categoryc=dao.loadCategory(cf.getId()); dao.delete(c);?//删除类别} returnmapping.findForward("paging");?} //分页?publicActionForwardpaging(ActionMappingmapping,ActionFormform, HttpServletRequestrequest,HttpServletResponseresponse) throwsException{ //获取当前页码 StringcurrPage=request.getParameter("currPage"); Stringaction=request.getContextPath()+"/baseData/category.mand=paging"; Stringhql="fromCategory"; //分页查询 Mapmap=this.getPage(hql,recPerPage,currPage,action,null); //将结果集放到request中 request.setAttribute("list",map.get("list")); //将结果集放到分页条中 request.setAttribute("pagingBar",map.get("bar")); returnmapping.findForward("ess");?} //统计药品类别数量