A View
is an interface in Spring MVC application whose implementations are responsible for rendering context and exposing the model. A single view exposes multiple model attributes. Views in Spring MVC can be beans.
They are likely to be instantiated as beans by a ViewResolver
. As this interface is stateless, view implementations should be thread-safe. By using ViewResolver
, a logical name of view can be resolved into different types of View implementation, e.g. JstlView for displaying JSP or other view implementations for FreeMarker and Velocity.