Java, .NET, PHP, PYTHON, ANGULAR, ML, Data Science, Testing, CI Tutorials in Easy Languages.

"Best Software Training, Internship, Project Development center of Indore India, Helpline 780506-3968"

Redirect from one page to another in Spring MVC:-

If we want to perform redirection into the spring MVC web application then we can use the redirect keyword under ModelAndView class Object and define the path of the controller.

suppose you want to create a login form and implement redirection after successful login then also we should use a redirect.

redirect also use browser cookie because it will redirect the page after browser instruction.


we will use ModelAndView class to implement Redirection from one web page to another.

we will write a redirect method under Model and View

return new ModelAndView("redirect:dashboard.do");


This code should be written on the Controller classes method, especially on login and logout operation.






Post a Comment

POST Answer of Questions and ASK to Doubt

Previous Post Next Post