So in situations where you are pulling from files out of the resource path - you can make those assumptions.1. Always provide a list of views generated/handled by this ViewResolver (not very nice is it)
2. As a fallback assume that the view is loadable with the current ResourceLoader (is going to fail miserably if you use something like tiles, velocity of freemarker which either don't have actual files or load files with a different strategy).
Why not expose a parameter on the UrlBasedViewResolver that is something like:
viewsAreFileBacked or some other flag (with a better name than that) - set to be false by default - that when true enables the UrlBasedViewResolvers to chain.
The insistence that you can't make those assumptions causes everyone I know of to immediately subclass and override the view resolver to allow it to chain - because in most situations you CAN chain the view resolvers - except in the limited situations you are talking about.


Reply With Quote