com.opensymphony.sitemesh.webapp.decorator
Class DispatchedDecorator

java.lang.Object
  extended by com.opensymphony.sitemesh.webapp.decorator.BaseWebAppDecorator
      extended by com.opensymphony.sitemesh.webapp.decorator.DispatchedDecorator
All Implemented Interfaces:
Decorator
Direct Known Subclasses:
ExternalDispatchedDecorator

public class DispatchedDecorator
extends BaseWebAppDecorator

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
static String CONTENT_KEY
           
static String CONTEXT_KEY
           
private  String path
           
 
Constructor Summary
DispatchedDecorator(String path)
           
 
Method Summary
protected  ServletContext locateWebApp(ServletContext context)
           
protected  void render(Content content, HttpServletRequest request, HttpServletResponse response, ServletContext servletContext, SiteMeshWebAppContext webAppContext)
          More convenient version of BaseWebAppDecorator.render(com.opensymphony.sitemesh.Content, com.opensymphony.sitemesh.SiteMeshContext) suited for Servlet API calls.
 
Methods inherited from class com.opensymphony.sitemesh.webapp.decorator.BaseWebAppDecorator
render
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

CONTENT_KEY

public static final String CONTENT_KEY
See Also:
Constant Field Values

CONTEXT_KEY

public static final String CONTEXT_KEY
See Also:
Constant Field Values

path

private final String path
Constructor Detail

DispatchedDecorator

public DispatchedDecorator(String path)
Method Detail

render

protected void render(Content content,
                      HttpServletRequest request,
                      HttpServletResponse response,
                      ServletContext servletContext,
                      SiteMeshWebAppContext webAppContext)
               throws IOException,
                      ServletException
Description copied from class: BaseWebAppDecorator
More convenient version of BaseWebAppDecorator.render(com.opensymphony.sitemesh.Content, com.opensymphony.sitemesh.SiteMeshContext) suited for Servlet API calls.

Specified by:
render in class BaseWebAppDecorator
Throws:
IOException
ServletException

locateWebApp

protected ServletContext locateWebApp(ServletContext context)

www.opensymphony.com/sitemesh/