Code example for ModelAndView

Methods: addObjectsetViewName

0
		return mv;
	} 
	 
	@RequestMapping(value="/manager/managerstudentpage",method=RequestMethod.GET)
	public ModelAndView studentPage(int classesid){
		ModelAndView mv=new ModelAndView();
		Classes cls = classesService.findClassesById(classesid);
		List<Student> stlist = classesService.findStudentByClassesId(classesid);
		mv.setViewName("addstudents");
		mv.addObject("sidebar","classes");
		mv.addObject("cls",cls);
		mv.addObject("stlist",stlist);
		mv.addObject("length", stlist.size());
		return mv;
	} 
	 
	@RequestMapping(value="/manager/classesnewspage",method=RequestMethod.GET)
	public ModelAndView classesnewsPage(int classesid){
		ModelAndView mv=new ModelAndView();
		Classes cls = classesService.findClassesById(classesid);
Connect your IDE to all the code out there  Get Codota for Java