// get the list of templates we can use org.apache.struts2.components.template.TemplateRenderingContext templateContext=new org.apache.struts2.components.templates.emplateRenderingContext(); List<Template> templates =templateContext.getTemplate().getPossibleTemplates(this); //find the template freemarker.template.Template template = null; org.apache.struts2.components.template.FreemarkerTemplateEngine freemarkerTemplateEngine=new org.apache.struts2.components.template.FreemarkerTemplateEngine() for (Template t : templates) { //struts.freemarker.templatesCache=true? if(freemarkerTemplateEngine.freemarkerCaching==true) { // look in cache template=freemarkerTemplateEngine. findInCache(templateName)); if (template == null) { log.debug("send flame email"); } } }
i think the person who created TemplateRenderingContext,FreemarkerTemplateEngine classes forgot to create no arg constructors no use yelling at them because they're long gone..add the no arg constructors yourself Martin Gainty ______________________________________________ Verzicht und Vertraulichkeitanmerkung/Note de déni et de confidentialité Diese Nachricht ist vertraulich. Sollten Sie nicht der vorgesehene Empfaenger sein, so bitten wir hoeflich um eine Mitteilung. Jede unbefugte Weiterleitung oder Fertigung einer Kopie ist unzulaessig. Diese Nachricht dient lediglich dem Austausch von Informationen und entfaltet keine rechtliche Bindungswirkung. Aufgrund der leichten Manipulierbarkeit von E-Mails koennen wir keine Haftung fuer den Inhalt uebernehmen. Ce message est confidentiel et peut être privilégié. Si vous n'êtes pas le destinataire prévu, nous te demandons avec bonté que pour satisfaire informez l'expéditeur. N'importe quelle diffusion non autorisée ou la copie de ceci est interdite. Ce message sert à l'information seulement et n'aura pas n'importe quel effet légalement obligatoire. Étant donné que les email peuvent facilement être sujets à la manipulation, nous ne pouvons accepter aucune responsabilité pour le contenu fourni. > To: user@struts.apache.org > CC: sa...@wernervas.com > Subject: Freemarker Template Caching > From: mmcken...@wernervas.com > Date: Mon, 6 Jun 2011 14:16:41 -0500 > > Hello, > > We have enabled freemarker template caching by using the following > settting in our struts.properties file: > > struts.freemarker.templatesCache=true > > My question is: How do we verify the cache is working? > > Thanks. > > Mitch