The view class for all views generated by this resolver can be specified
via setViewClass(Class) . See UrlBasedViewResolver's javadoc for details.
BTW, it's good practice to put JSP files that just serve as views under
WEB-INF, to hide them from direct access (e.g. via a manually entered URL).
Only controllers will be able to access them then.
Note: When chaining ViewResolvers, an InternalResourceViewResolver
always needs to be last, as it will attempt to resolve any view name,
no matter whether the underlying resource actually exists.
The view class for all views generated by this resolver can be specified via setViewClass(Class) . See UrlBasedViewResolver's javadoc for details.
BTW, it's good practice to put JSP files that just serve as views under WEB-INF, to hide them from direct access (e.g. via a manually entered URL). Only controllers will be able to access them then.
Note: When chaining ViewResolvers, an InternalResourceViewResolver always needs to be last, as it will attempt to resolve any view name, no matter whether the underlying resource actually exists.