com.atlassian.bamboo.ww2
Class FreemarkerRequestDispatcherPageFilter

java.lang.Object
  extended by com.opensymphony.module.sitemesh.filter.PageFilter
      extended by com.opensymphony.webwork.sitemesh.TemplatePageFilter
          extended by com.atlassian.bamboo.ww2.FreemarkerRequestDispatcherPageFilter
All Implemented Interfaces:
com.opensymphony.module.sitemesh.RequestConstants, javax.servlet.Filter

public class FreemarkerRequestDispatcherPageFilter
extends com.opensymphony.webwork.sitemesh.TemplatePageFilter

A filter that works like FreeMarkerPageFilter but it delegates back to a request dispatcher if the template is not found


Field Summary
 
Fields inherited from interface com.opensymphony.module.sitemesh.RequestConstants
DECORATOR, FILTER_APPLIED, PAGE, ROBOT, USING_STREAM
 
Constructor Summary
FreemarkerRequestDispatcherPageFilter()
           
 
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, javax.servlet.ServletContext servletContext, com.opensymphony.xwork.ActionContext ctx)
           
protected  java.util.Locale getLocale(com.opensymphony.xwork.ActionInvocation invocation, freemarker.template.Configuration configuration)
          Returns the locale used for the Configuration.getTemplate(String, Locale) call.
 
Methods inherited from class com.opensymphony.webwork.sitemesh.TemplatePageFilter
applyDecorator, getEncoding, init
 
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
 

Constructor Detail

FreemarkerRequestDispatcherPageFilter

public FreemarkerRequestDispatcherPageFilter()
Method Detail

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,
                              javax.servlet.ServletContext servletContext,
                              com.opensymphony.xwork.ActionContext ctx)
                       throws javax.servlet.ServletException,
                              java.io.IOException
Specified by:
applyDecorator in class com.opensymphony.webwork.sitemesh.TemplatePageFilter
Throws:
javax.servlet.ServletException
java.io.IOException

getLocale

protected java.util.Locale getLocale(com.opensymphony.xwork.ActionInvocation invocation,
                                     freemarker.template.Configuration configuration)
Returns the locale used for the 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,



Copyright © 2011 Atlassian. All Rights Reserved.