1. 程式人生 > >SpringMVC頁面傳值

SpringMVC頁面傳值

mvc 傳值 ray springmvc name web mvc頁面傳值 urn 小明

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;
}

SpringMVC頁面傳值