Reputation: 3923
Is there a framework provided/specific way where we can do requestDispatcher and sendRedirect similar to simple Java EE MVC applications?
Please suggest the methods.
Upvotes: 4
Views: 4525
Reputation: 8322
you can redirect in spring like this
@RequestMapping(method = RequestMethod.POST)
public String processForm(ModelMap model) {
// process form data
model.addAttribute("notification", "Successfully did it!");
return "redirect:/form";
}
Upvotes: 4