Class DispatchedDecorator
java.lang.Object
com.opensymphony.sitemesh.webapp.decorator.BaseWebAppDecorator
com.opensymphony.sitemesh.webapp.decorator.DispatchedDecorator
- All Implemented Interfaces:
Decorator
- Direct Known Subclasses:
ExternalDispatchedDecorator
Decorator that dispatches to another path in the Servlet Container (such as a JSP or path mapped to a Servlet).
The Content and SiteMeshContext objects are passed to the decorator using the HttpServletRequest attributes
CONTENT_KEY and CONTEXT_KEY.
To dispatch to a decorator in another web-app on the same server, use ExternalDispatchedDecorator.
- Since:
- SiteMesh 3.0
- Author:
- Joe Walnes
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected javax.servlet.ServletContextlocateWebApp(javax.servlet.ServletContext context) Locate web app.protected voidrender(Content content, javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response, javax.servlet.ServletContext servletContext, SiteMeshWebAppContext webAppContext) Render.Methods inherited from class com.opensymphony.sitemesh.webapp.decorator.BaseWebAppDecorator
render
-
Field Details
-
CONTENT_KEY
The Constant CONTENT_KEY.- See Also:
-
CONTEXT_KEY
The Constant CONTEXT_KEY.- See Also:
-
-
Constructor Details
-
DispatchedDecorator
Instantiates a new dispatched decorator.- Parameters:
path- the path
-
-
Method Details
-
render
protected void render(Content content, javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response, javax.servlet.ServletContext servletContext, SiteMeshWebAppContext webAppContext) throws IOException, javax.servlet.ServletException Render.- Specified by:
renderin classBaseWebAppDecorator- Parameters:
content- the contentrequest- the requestresponse- the responseservletContext- the servlet contextwebAppContext- the web app context- Throws:
IOException- Signals that an I/O exception has occurred.javax.servlet.ServletException- the servlet exception
-
locateWebApp
protected javax.servlet.ServletContext locateWebApp(javax.servlet.ServletContext context) Locate web app.- Parameters:
context- the context- Returns:
- the servlet context
-