public class FreemarkerRequestDispatcherPageFilter
extends org.apache.struts2.sitemesh.TemplatePageFilter
FreeMarkerPageFilter
but it delegates back to a
request dispatcher if the template is not foundModifier and Type | Field and Description |
---|---|
static String |
BAMBOO_SUCCESS_RETURN_MODE |
static String |
BAMBOO_SUCCESS_RETURN_MODE_JSON |
static String |
BAMBOO_SUCCESS_RETURN_MODE_JSON_AS_HTML |
static String |
HEADER_NO_DECORATE |
static String |
HEADER_X_HISTORY_XHR |
Constructor and Description |
---|
FreemarkerRequestDispatcherPageFilter() |
Modifier and Type | Method and Description |
---|---|
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,
javax.servlet.ServletContext servletContext,
com.opensymphony.xwork2.ActionContext ctx) |
protected Locale |
getLocale(com.opensymphony.xwork2.ActionInvocation invocation,
freemarker.template.Configuration configuration)
Returns the locale used for the
Configuration.getTemplate(String, Locale) call. |
void |
init(javax.servlet.FilterConfig filterConfig) |
protected com.opensymphony.sitemesh.DecoratorSelector |
initDecoratorSelector(com.opensymphony.sitemesh.webapp.SiteMeshWebAppContext webAppContext) |
static void |
setFreemarkerManager(org.apache.struts2.views.freemarker.FreemarkerManager mgr) |
applyDecorator, getEncoding, setCustomEncoding
public static final String HEADER_X_HISTORY_XHR
public static final String HEADER_NO_DECORATE
public static final String BAMBOO_SUCCESS_RETURN_MODE
public static final String BAMBOO_SUCCESS_RETURN_MODE_JSON
public static final String BAMBOO_SUCCESS_RETURN_MODE_JSON_AS_HTML
public FreemarkerRequestDispatcherPageFilter()
public void init(javax.servlet.FilterConfig filterConfig)
init
in interface javax.servlet.Filter
init
in class org.apache.struts2.sitemesh.TemplatePageFilter
protected com.opensymphony.sitemesh.DecoratorSelector initDecoratorSelector(com.opensymphony.sitemesh.webapp.SiteMeshWebAppContext webAppContext)
initDecoratorSelector
in class com.opensymphony.sitemesh.webapp.SiteMeshFilter
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, javax.servlet.ServletContext servletContext, com.opensymphony.xwork2.ActionContext ctx) throws javax.servlet.ServletException, IOException
applyDecorator
in class org.apache.struts2.sitemesh.TemplatePageFilter
javax.servlet.ServletException
IOException
protected Locale getLocale(com.opensymphony.xwork2.ActionInvocation invocation, freemarker.template.Configuration configuration)
Configuration.getTemplate(String, Locale)
call. The base implementation
simply returns the locale setting of the action (assuming the action implements LocaleProvider
) or, if
the action does not the configuration's locale is returned. Override this method to provide different behaviour,public static void setFreemarkerManager(org.apache.struts2.views.freemarker.FreemarkerManager mgr)
Copyright © 2019 Atlassian Software Systems Pty Ltd. All rights reserved.