Skip to main content

redirect:

Learn redirect: (Model & View, Spring MVC) with worked examples, diagrams and interview questions. Free on JavaSchoolLab.

Fresher Notes redirect: is a prefix on a view name, as in new ModelAndView("redirect:/users") ; Spring turns it into a RedirectView . Handled by UrlBasedViewResolver (and its subclasses), which checks the prefix before applying prefix and suffix. Result : an HTTP 302 response with a Location header; no template is rendered.

More lessons in Model & View