- All Known Implementing Classes:
public interface ViewResolver
Interface to be implemented by objects that can resolve views by name.
View state doesn't change during the running of the application, so implementations are free to cache views.
Implementations are encouraged to support internationalization, i.e. localized view resolution.
- Rod Johnson, Juergen Hoeller
- See Also:
Method SummaryModifier and TypeMethodDescription
(String viewName, Locale locale)Resolve the given view by name.
resolveViewNameResolve the given view by name.
Note: To allow for ViewResolver chaining, a ViewResolver should return
nullif a view with the given name is not defined in it. However, this is not required: Some ViewResolvers will always attempt to build View objects with the given name, unable to return
null(rather throwing an exception when View creation failed).
viewName- name of the view to resolve
locale- the Locale in which to resolve the view. ViewResolvers that support internationalization should respect this.
- the View object, or
nullif not found (optional, to allow for ViewResolver chaining)
Exception- if the view cannot be resolved (typically in case of problems creating an actual View object)