Wrapper for a JSP or other resource within the same web application.
Exposes model objects as request attributes and forwards the request to
the specified resource URL using a RequestDispatcher.
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 InternalResourceViewResolver would look as follows,
from the perspective of the DispatcherServlet context definition:
public InternalResourceView(String url, boolean alwaysInclude)(Code)
Create a new InternalResourceView with the given URL.
Parameters: url - the URL to forward to Parameters: alwaysInclude - whether to always include the view rather than forward to it
Expose the current request URI and paths as
HttpServletRequest attributes under the keys defined in the Servlet 2.4 specification,
for Servlet 2.3- containers.
Prepare for rendering, and determine the request dispatcher path
to forward to (or to include).
This implementation simply returns the configured URL.
Subclasses can override this to determine a resource to render,
typically interpreting the URL in a different manner.
Parameters: request - current HTTP request Parameters: response - current HTTP response the request dispatcher path to use throws: Exception - if preparations failed See Also:InternalResourceView.getUrl See Also:org.springframework.web.servlet.view.tiles.TilesView.prepareForRendering