Skip to main content

ViewResolver

Learn ViewResolver (DispatcherServlet, Spring MVC) with worked examples, diagrams and interview questions. Free on JavaSchoolLab.

Fresher Notes ViewResolver turns a logical view name returned by a controller (such as home ) into a real View object that renders the page. Why : controllers stay independent of the template technology, so you can switch JSP, Thymeleaf or FreeMarker by configuration. Not used for @RestController or @ResponseBody , because there is no view to render.

More lessons in DispatcherServlet