In spring controller class to redirect to a url
some places all using
return "redirect:/abc.htm";
.also using
return new ModelAndView("redirect:/abc.htm")
.
Any one please explain the difference and similarities of both statements.
And in which situation it has to use.
Rohit:
Am using RedirectAttribute to get values from old url.
In this case am getting value while using this return "redirect:/abc.htm";
but not in this return new ModelAndView("redirect:/abc.htm")
.
Is there any difference in RedirectAttributes
ModelAndView
is old way which existed before Spring 2.0.