org.apache.struts2.sitemesh
Class TemplatePageFilter
java.lang.Object
com.opensymphony.module.sitemesh.filter.PageFilter
org.apache.struts2.sitemesh.TemplatePageFilter
- All Implemented Interfaces:
- com.opensymphony.module.sitemesh.RequestConstants, javax.servlet.Filter
- Direct Known Subclasses:
- FreeMarkerPageFilter, VelocityPageFilter
public abstract class TemplatePageFilter
- extends com.opensymphony.module.sitemesh.filter.PageFilter
An abstract template page filter that sets up the proper contexts for
template processing.
Fields inherited from interface com.opensymphony.module.sitemesh.RequestConstants |
DECORATOR, FILTER_APPLIED, PAGE, ROBOT, USING_STREAM |
Method Summary |
protected void |
applyDecorator(com.opensymphony.module.sitemesh.Page page,
com.opensymphony.module.sitemesh.Decorator decorator,
javax.servlet.http.HttpServletRequest req,
javax.servlet.http.HttpServletResponse res)
Applies the decorator, creating the relevent contexts and delegating to
the extended applyDecorator(). |
protected abstract void |
applyDecorator(com.opensymphony.module.sitemesh.Page page,
com.opensymphony.module.sitemesh.Decorator decorator,
javax.servlet.http.HttpServletRequest req,
javax.servlet.http.HttpServletResponse res,
javax.servlet.ServletContext servletContext,
com.opensymphony.xwork2.ActionContext ctx)
Applies the decorator, using the relevent contexts |
protected java.lang.String |
getEncoding()
Gets the L18N encoding of the system. |
void |
init(javax.servlet.FilterConfig filterConfig)
|
static void |
setCustomEncoding(java.lang.String enc)
|
Methods inherited from class com.opensymphony.module.sitemesh.filter.PageFilter |
destroy, doFilter, getFilterConfig, parsePage, setFilterConfig |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
TemplatePageFilter
public TemplatePageFilter()
setCustomEncoding
public static void setCustomEncoding(java.lang.String enc)
init
public void init(javax.servlet.FilterConfig filterConfig)
- Specified by:
init
in interface javax.servlet.Filter
- Overrides:
init
in class com.opensymphony.module.sitemesh.filter.PageFilter
applyDecorator
protected abstract void applyDecorator(com.opensymphony.module.sitemesh.Page page,
com.opensymphony.module.sitemesh.Decorator decorator,
javax.servlet.http.HttpServletRequest req,
javax.servlet.http.HttpServletResponse res,
javax.servlet.ServletContext servletContext,
com.opensymphony.xwork2.ActionContext ctx)
throws javax.servlet.ServletException,
java.io.IOException
- Applies the decorator, using the relevent contexts
- Parameters:
page
- The pagedecorator
- The decoratorreq
- The servlet requestres
- The servlet responseservletContext
- The servlet contextctx
- The action context for this request, populated with the server state
- Throws:
javax.servlet.ServletException
java.io.IOException
applyDecorator
protected void applyDecorator(com.opensymphony.module.sitemesh.Page page,
com.opensymphony.module.sitemesh.Decorator decorator,
javax.servlet.http.HttpServletRequest req,
javax.servlet.http.HttpServletResponse res)
throws javax.servlet.ServletException,
java.io.IOException
- Applies the decorator, creating the relevent contexts and delegating to
the extended applyDecorator().
- Overrides:
applyDecorator
in class com.opensymphony.module.sitemesh.filter.PageFilter
- Parameters:
page
- The pagedecorator
- The decoratorreq
- The servlet requestres
- The servlet response
- Throws:
javax.servlet.ServletException
java.io.IOException
getEncoding
protected java.lang.String getEncoding()
- Gets the L18N encoding of the system. The default is UTF-8.
Copyright © 2000-2007 Apache Software Foundation. All Rights Reserved.