I have 2 controllers:
Anytime I hit StartController, it forwards to EndController, but the Model in EndController is always empty.Code:@Controller public class StartController { @RequestMapping(value = "/start") public ModelAndView start(){ HashMap<String, Object> model = new HashMap<String, Object>(); model.put("hello", "world"); return new ModelAndView("forward:/end", model); } } @Controller public class EndController { @RequestMapping(value = "/end") public ModelAndView end(Model model){ System.out.println(model); //model is empty return null; } }
I suspect I'm doing something fundamentally wrong, since the issue persists in both 3.1.0 and 3.2.1, but I couldn't google out the answer why this happens. Can anyone suggest?


Reply With Quote
