Can you list different types of ViewResolvers used in Spring MVC?

A ViewResolver in Spring MVC maps the logical view name returned by a controller to an actual renderable view, and Spring ships several implementations for different templating and response technologies.

Key Points

Example

A traditional Spring MVC app serving JSPs under /WEB-INF/views/ with a .jsp suffix would configure an InternalResourceViewResolver, while a REST-style endpoint returning a Map would rely on MappingJackson2JsonView to serialize it straight to JSON.

Interview Tip

A concise interview answer is

Spring MVC has a ViewResolver interface with several implementations depending on the view technology — InternalResourceViewResolver for JSP, ThymeleafViewResolver or FreeMarkerViewResolver for template engines, and Jackson-based view classes for JSON or XML output. You can even chain multiple resolvers with an order so Spring tries each until one resolves the view name.

Last updated: 16 July 2026

Previous question: What is ViewResolver in Spring MVC and how does it work?

Next question: How does InternalResourceViewResolver work in Spring MVC?

More Spring MVC (Optional) interview questions

All Spring MVC (Optional) questions