A URL for this view is supposed to specify a resource within the web application, suitable for RequestDispatcher's forward
or include
method.
If operating within an already included request or within a response that has already been committed, this view will fall back to an include instead of a forward. This can be enforced by calling response.flushBuffer()
(which will commit the response) before rendering the view.
Typical usage with {@link InternalResourceViewResolver} looks as follows,from the perspective of the DispatcherServlet context definition:
<bean id="viewResolver" class="org.springframework.web.servlet.view.InternalResourceViewResolver"> <property name="prefix" value="/WEB-INF/jsp/"/> <property name="suffix" value=".jsp"/> </bean>Every view name returned from a handler will be translated to a JSP resource (for example: "myView" -> "/WEB-INF/jsp/myView.jsp"), using this view class by default. @author Rod Johnson @author Juergen Hoeller @author Rob Harrop @see javax.servlet.RequestDispatcher#forward @see javax.servlet.RequestDispatcher#include @see javax.servlet.ServletResponse#flushBuffer @see InternalResourceViewResolver @see JstlView
|
|