Details
-
Bug
-
Status: Closed
-
Major
-
Resolution: Implemented
-
2.1.2
-
None
-
None
-
Tomcat 6.0.18
-
Important
Description
When customizing freemarker template folder to any different folder than "template"
<constant name="struts.ui.templateDir" value="WEB-INF/template" /> in struts.xml or
struts.ui.templateDir=WEB-INF/template in struts.properties
struts.ui.theme=xhtml
When browse to a jsp or action page, errors happen because it could not found the template file in parent dir. for example the actionerror.ftl or div-close.ftl in simple theme (template/simple dir), but struts2 try to look up this file in xhtml(template/xhtml dir)
2008-12-17 18:09:56,440 ERROR (org.apache.struts2.components.UIBean:28) - error when rendering
java.io.FileNotFoundException: Template /WEB-INF/template/xhtml/actionerror.ftl not found.
at freemarker.template.Configuration.getTemplate(Configuration.java:489)
at freemarker.template.Configuration.getTemplate(Configuration.java:452)
at org.apache.struts2.components.template.FreemarkerTemplateEngine.renderTemplate(Freemarker
TemplateEngine.java:121)
at org.apache.struts2.components.UIBean.mergeTemplate(UIBean.java:558)
at org.apache.struts2.components.UIBean.end(UIBean.java:512)
at org.apache.struts2.views.jsp.ComponentTagSupport.doEndTag(ComponentTagSupport.java:42)