I am currently reading Spring in Action and I am trying to configure a view resolver in spring, however the book didn't say "How spring chooses which View Resolver to use" Its describer to configure the InternalResourceViewResolver and how to add prefix and suffix. But, I could't not find how spring chooses which Resolver to use. What tell spring which resolver to use ?
Edited: quote from the book :
"" What’s missing here is how Spring knows about Tiles definitions. By itself, Tiles- ViewResolver doesn’t know anything about any Tiles definitions, but instead relies on a TilesConfigurer to keep track of that information. So we’ll need to add a Tiles- Configurer bean to spitter-servlet.xml: /WEB-INF/viewsviews.xml ""
The book never answered the question it asked: "how Spring knows about Tiles definitions"
DispatcherServletconsults allViewResolvers in the application context until one of them returns a view. - M. Deinumorderattribute if defined. However if you have aUrlBasedViewResolveras first in your view resolver chain the others will not be consulted. anUrlBasedViewResolversimply creates a URL and forwards to that URL. It doesn't check if that URL actually results in a view to render. - M. Deinum