Package com.atlassian.bamboo.ww2
Class FreemarkerRequestDispatcherPageFilter
java.lang.Object
com.opensymphony.sitemesh.webapp.SiteMeshFilter
org.apache.struts2.sitemesh.FreemarkerPageFilter
com.atlassian.bamboo.ww2.FreemarkerRequestDispatcherPageFilter
- All Implemented Interfaces:
jakarta.servlet.Filter
public class FreemarkerRequestDispatcherPageFilter
extends org.apache.struts2.sitemesh.FreemarkerPageFilter
A filter that works like
FreemarkerPageFilter but it delegates back to a
request dispatcher if the template is not found-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classThis class overrides Struts' StrutsSiteMeshFactory to allow parsing pages inside action tags. -
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected voidapplyDecorator(com.opensymphony.module.sitemesh.Page page, com.opensymphony.module.sitemesh.Decorator decorator, jakarta.servlet.http.HttpServletRequest req, jakarta.servlet.http.HttpServletResponse res, jakarta.servlet.ServletContext servletContext, org.apache.struts2.ActionContext ctx) protected LocalegetLocale(org.apache.struts2.ActionInvocation invocation, freemarker.template.Configuration configuration) Returns the locale used for theConfiguration.getTemplate(String, Locale)call.voidinit(jakarta.servlet.FilterConfig filterConfig) protected com.opensymphony.sitemesh.DecoratorSelectorinitDecoratorSelector(com.opensymphony.sitemesh.webapp.SiteMeshWebAppContext webAppContext) static voidsetFreemarkerManager(org.apache.struts2.views.freemarker.FreemarkerManager mgr) Methods inherited from class com.opensymphony.sitemesh.webapp.SiteMeshFilter
destroy, doFilter, initContentProcessor
-
Field Details
-
HEADER_X_HISTORY_XHR
- See Also:
-
HEADER_NO_DECORATE
- See Also:
-
BAMBOO_SUCCESS_RETURN_MODE
- See Also:
-
BAMBOO_SUCCESS_RETURN_MODE_JSON
- See Also:
-
BAMBOO_SUCCESS_RETURN_MODE_JSON_AS_HTML
- See Also:
-
-
Constructor Details
-
FreemarkerRequestDispatcherPageFilter
public FreemarkerRequestDispatcherPageFilter()
-
-
Method Details
-
init
public void init(jakarta.servlet.FilterConfig filterConfig) - Specified by:
initin interfacejakarta.servlet.Filter- Overrides:
initin classorg.apache.struts2.sitemesh.FreemarkerPageFilter
-
initDecoratorSelector
protected com.opensymphony.sitemesh.DecoratorSelector initDecoratorSelector(com.opensymphony.sitemesh.webapp.SiteMeshWebAppContext webAppContext) - Overrides:
initDecoratorSelectorin classorg.apache.struts2.sitemesh.FreemarkerPageFilter
-
applyDecorator
protected void applyDecorator(com.opensymphony.module.sitemesh.Page page, com.opensymphony.module.sitemesh.Decorator decorator, jakarta.servlet.http.HttpServletRequest req, jakarta.servlet.http.HttpServletResponse res, jakarta.servlet.ServletContext servletContext, org.apache.struts2.ActionContext ctx) throws jakarta.servlet.ServletException, IOException - Throws:
jakarta.servlet.ServletExceptionIOException
-
getLocale
protected Locale getLocale(org.apache.struts2.ActionInvocation invocation, freemarker.template.Configuration configuration) Returns the locale used for theConfiguration.getTemplate(String, Locale)call. The base implementation simply returns the locale setting of the action (assuming the action implementsLocaleProvider) or, if the action does not the configuration's locale is returned. Override this method to provide different behaviour, -
setFreemarkerManager
public static void setFreemarkerManager(org.apache.struts2.views.freemarker.FreemarkerManager mgr)
-