Spring MVC provides a very flexible View resolution. It provides multiple View options:
- There is integration with JSP and, Freemarker.
- There are multiple View resolution strategies. A few of them are listed as follows:
- XmlViewResolver: View resolution based on an external XML configuration.
- ResourceBundleViewResolver: View resolution based on a property file.
- UrlBasedViewResolver: This direct mapping of the logical View name to a URL.
- ContentNegotiatingViewResolver: This delegates to other View resolvers based on the accept request header.
- InternalResourceViewResolver : This is a subclass of UrlBasedViewResolver. It provides support for servlets and JSPs along with JstlView and TilesView.
- There is support for chaining of View resolvers with the explicitly defined order of preference.
- It provides direct generation of XML, JSON, and Atom using content negotiation.