SpringMVC页面传值

public ModelAndView query(){
ModelAndView modelAndView = new ModelAndView();
List list = new ArrayList();
list.add("小明");
modelAndView.addObject("list",list);
modelAndView.setViewName("/WEB-INF/jsp/list.jsp");
return modelAndView;
}

posted @ 2017-06-11 23:53  江山一族  阅读(228)  评论(0编辑  收藏  举报