Saturday, November 9, 2013

List of View Resolvers in Spring MVC

In Spring MVC, view resolvers enable you to render models in a browser without tying you to a specific view technology like JSP, Velocity, XML…etc.

There are two interfaces that are important to the way Spring handles views areViewResolver and View. The View Resolver provides a mapping between view names and actual views. The View interface addresses the preparation of the request and hands the request over to one of the view technologies.

Below are the important view resolvers provided by spring framework:
  1. AbstractCachingViewResolver : Abstract view resolver that caches views. Often views need preparation before they can be used; extending this view resolver provides caching.
  2. XmlViewResolver : Implementation of ViewResolver that accepts a configuration file written in XML with the same DTD as Spring’s XML bean factories. The default configuration file is /WEB-INF/views.xml.
                                                                                                                                                                More>>>

No comments: