public class WebSiteTemplate
extends java.lang.Object
implements javax.servlet.Filter
PAGE_DATA and PrintPageContentTag
while the request is frowarded to the specified JSP file which will then take responsibility for re-injecting
the page data.| Modifier and Type | Field and Description |
|---|---|
static java.lang.String |
ACTUAL_QUERY_STRING |
static java.lang.String |
ACTUAL_REQUEST_DIR |
static java.lang.String |
ACTUAL_REQUEST_URI |
protected javax.servlet.FilterConfig |
filterConfig |
static java.lang.String |
PAGE_DATA
The parameter name for the data being edited.
|
protected java.lang.String |
templateFileName
The file name of the template to be used.
|
| Constructor and Description |
|---|
WebSiteTemplate() |
| Modifier and Type | Method and Description |
|---|---|
protected boolean |
canApplyDecorators(javax.servlet.http.HttpServletRequest request)
This implementation always assumes we can apply the decorators
|
void |
destroy() |
void |
doFilter(javax.servlet.ServletRequest req,
javax.servlet.ServletResponse resp,
javax.servlet.FilterChain chain) |
protected java.lang.String |
getFileName(javax.servlet.http.HttpServletRequest request) |
protected javax.servlet.ServletContext |
getServletContext() |
void |
init(javax.servlet.FilterConfig newConfig) |
protected void |
injectAttributes(javax.servlet.http.HttpServletRequest request)
The default implementation does not inject any new attributes
|
protected boolean |
redirectResponse(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response)
This implementation always assumes we do not need to redirect
|
public static final java.lang.String ACTUAL_REQUEST_URI
public static final java.lang.String ACTUAL_REQUEST_DIR
public static final java.lang.String ACTUAL_QUERY_STRING
public static final java.lang.String PAGE_DATA
protected javax.servlet.FilterConfig filterConfig
protected java.lang.String templateFileName
public void init(javax.servlet.FilterConfig newConfig)
init in interface javax.servlet.Filterprotected javax.servlet.ServletContext getServletContext()
public void destroy()
destroy in interface javax.servlet.Filterprotected java.lang.String getFileName(javax.servlet.http.HttpServletRequest request)
protected boolean redirectResponse(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response)
throws java.io.IOException
request - The HttpServletRequest used to fetch attributes and parameters from.response - The HttpServletResponse with which redirects are sent.doFilter(javax.servlet.ServletRequest, javax.servlet.ServletResponse, javax.servlet.FilterChain)
should return without futher processing.java.io.IOException - on exceptionprotected boolean canApplyDecorators(javax.servlet.http.HttpServletRequest request)
request - The HttpServletRequest used to fetch attributes and parameters from.protected void injectAttributes(javax.servlet.http.HttpServletRequest request)
throws java.io.IOException
request - The HttpServletRequest into which attributes will be injectedjava.io.IOException - on exceptionpublic void doFilter(javax.servlet.ServletRequest req,
javax.servlet.ServletResponse resp,
javax.servlet.FilterChain chain)
throws java.io.IOException,
javax.servlet.ServletException
doFilter in interface javax.servlet.Filterjava.io.IOExceptionjavax.servlet.ServletException