The right View is chosen by the ViewResolver
in Spring MVC. When Controller returns a logical view name to DispatcherServlet, it consults to ViewResolver to find the right View.
The ViewResolver
, depending upon its implementation, resolves the logical view into a physical resource, e.g. a JSP page or a FreeMarker template.