I have a method in my controller say demo
@RequestMapping(value="/demo")
public ModelAndView demo("some parameters..")
{
.
.
.
.
return new ModelAndView("newPage","Message","Welcome to new Page");
{
This will send the data to the "newPage". now my question is, can I send the same data to one more page? Does ModelAndView allows it? Every Advice is Appreciated.
ModelAndView pass data to Page scope. So Model And View can't send data to other pages. So you should use Session scope or Application scope to pass data to other pages.
Session -> session.setAttribute("key",data);
Application -> context.setAttribute("key",data);