String id = request.getParameter("categoryId");
String sendMsg = request.getParameter("sendMsg");
ApplicationContext ac = WebApplicationContextUtils.getWebApplicationContext(this.getServletContext());
ICategoryDao categoryDao = (ICategoryDao)ac.getBean("categoryDao");
Category category = categoryDao.findCategory(Long.parseLong(id));
if(category != null)
{
category.setName(name);
category.setDescription(description);
category.setSendMsg(sendMsg);
categoryDao.updateCategory(category);
}
IGatewayService gatewayService = (IGatewayService) ac.getBean("gatewayService");
//更新ServletContext中的目录列表