对于handler不需要实现任何接口
@Controllerpublic class ItemsHandler3 { @RequestMapping("/queryitems") public ModelAndView queryitems(){ //***************** ModelAndView modelAndView = new ModelAndView(); modelAndView.addObject(itemsList); modelAndView.setViewName("/WEB-INF/jsp/items/itemsList.jsp"); return modelAndView; }
访问路径为/queryitems.action