|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.sitemesh.BaseSiteMeshContext
org.sitemesh.webapp.WebAppContext
public class WebAppContext
SiteMesh SiteMeshContext implementation specifically for webapps running in a Servlet
container. Makes HttpServletRequest, HttpServletResponse and
ServletContext available to web-app specific SiteMesh components.
| Field Summary | |
|---|---|
static String |
CONTENT_KEY
Key that the ContentProperty is stored under in the HttpServletRequest
attribute. |
static String |
CONTEXT_KEY
Key that the WebAppContext is stored under in the HttpServletRequest
attribute. |
| Constructor Summary | |
|---|---|
WebAppContext(String contentType,
javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response,
javax.servlet.ServletContext servletContext,
ContentProcessor contentProcessor,
ResponseMetaData metaData)
|
|
| Method Summary | |
|---|---|
protected void |
decorate(String decoratorPath,
Content content,
Writer out)
Dispatches to another path to render a decorator. |
protected void |
dispatch(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response,
String path)
Dispatch to the actual path. |
String |
getContentType()
|
String |
getPath()
Get path of the page currently being displayed. |
javax.servlet.http.HttpServletRequest |
getRequest()
|
static String |
getRequestPath(javax.servlet.http.HttpServletRequest request)
|
javax.servlet.http.HttpServletResponse |
getResponse()
|
javax.servlet.ServletContext |
getServletContext()
|
| Methods inherited from class org.sitemesh.BaseSiteMeshContext |
|---|
decorate, getContentToMerge |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final String CONTENT_KEY
ContentProperty is stored under in the HttpServletRequest
attribute. It is "org.sitemesh.content.Content".
public static final String CONTEXT_KEY
WebAppContext is stored under in the HttpServletRequest
attribute. It is "org.sitemesh.SiteMeshContext".
| Constructor Detail |
|---|
public WebAppContext(String contentType,
javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response,
javax.servlet.ServletContext servletContext,
ContentProcessor contentProcessor,
ResponseMetaData metaData)
| Method Detail |
|---|
public javax.servlet.http.HttpServletRequest getRequest()
public javax.servlet.http.HttpServletResponse getResponse()
public javax.servlet.ServletContext getServletContext()
public String getContentType()
public String getPath()
SiteMeshContext
public static String getRequestPath(javax.servlet.http.HttpServletRequest request)
protected void decorate(String decoratorPath,
Content content,
Writer out)
throws IOException
This path may anything that handles a standard request (e.g. Servlet, JSP, MVC framework, etc).
The end point can access the ContentProperty and SiteMeshContext by using
looking them up as HttpServletRequest attributes under the keys
CONTENT_KEY and
CONTEXT_KEY respectively.
decorate in class BaseSiteMeshContextIOException
protected void dispatch(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response,
String path)
throws javax.servlet.ServletException,
IOException
javax.servlet.ServletException
IOException
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||