Java Mailing List Archive

Home » Home (12/2007) » Struts 2 »

Extending the FreemarkerManager




I am extending to FreemarkerManager to customize the tempalte:

  protected Configuration createConfiguration(ServletContext
servletContext) throws TemplateException {
    Configuration config = super.createConfiguration(servletContext);
    ClassTemplateLoader ctl = new ClassTemplateLoader(getClass(), "");
    TemplateLoader[] loaders = new TemplateLoader[] { ctl };
    MultiTemplateLoader mtl = new MultiTemplateLoader(loaders);
    return config;

So, i override this protected method right. And then in the struts.xml I set
the following property

  <constant name="struts.freemarker.manager.classname"

But, when I try to access the my application it says it could not find the
FTL files.

Keeping that aside, I tried keeping some basic log messages by overriding
the method but no use, the basic issue I am having is how else can I make
struts to use my Custom Freemarker class.

Any ideas, please?

Sent from the Struts - User mailing list archive at

To unsubscribe, e-mail: user-unsubscribe@(protected)
For additional commands, e-mail: user-help@(protected)

©2008 - Jax Systems, LLC, U.S.A.