struts2 freemarker.template.TemplateNotFoundException

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

struts2 freemarker.template.TemplateNotFoundException

john lee
Please help
I use struts2 to handle file upload, i already configured the following
a. /WEB-INF/lib    contains     commons-fileupload-1.3.2.jar    commons-io-2.2.jar     
b. /WEB-INF/classes/struts.xml     
   <constant name="struts.ui.theme" value="simple" />
  <constant name="struts.ui.templateDir" value="template" />
c. /var/apache-tomcat-7.0.34/webapps/mytest/WEB-INF/classes/dream
    mytest    application name    dream     package name
    contains
    template          /* folder name */    System  give me the error message as the following

SEVERE: Servlet.service() for servlet jsp threw exceptionfreemarker.template.TemplateNotFoundException: Template not found for name "/template/away from cold/file.ftl".The name was interpreted by this TemplateLoader: org.apache.struts2.views.freemarker.FreemarkerThemeTemplateLoader@1533de9.        at freemarker.template.Configuration.getTemplate(Configuration.java:1584)        at freemarker.template.Configuration.getTemplate(Configuration.java:1401)        at org.apache.struts2.components.template.FreemarkerTemplateEngine.renderTemplate(FreemarkerTemplateEngine.java:97)        at org.apache.struts2.components.UIBean.mergeTemplate(UIBean.java:584)        at org.apache.struts2.components.UIBean.end(UIBean.java:538)        at org.apache.struts2.views.jsp.ComponentTagSupport.doEndTag(ComponentTagSupport.java:42)        at org.apache.jsp.PropertyPhotoEdit_jsp._jspx_meth_s_005ffile_005f0(PropertyPhotoEdit_jsp.java:293)

Reply | Threaded
Open this post in threaded view
|

Re: struts2 freemarker.template.TemplateNotFoundException

Lukasz Lenart
What do you want to achieve? Do you use your own theme? Can you share
configuration of the action and JSP?


Regards
--
Łukasz
+ 48 606 323 122 http://www.lenart.org.pl/

2018-04-16 1:05 GMT+02:00 john lee <[hidden email]>:

> Please help
> I use struts2 to handle file upload, i already configured the following
> a. /WEB-INF/lib    contains     commons-fileupload-1.3.2.jar    commons-io-2.2.jar
> b. /WEB-INF/classes/struts.xml
>    <constant name="struts.ui.theme" value="simple" />
>   <constant name="struts.ui.templateDir" value="template" />
> c. /var/apache-tomcat-7.0.34/webapps/mytest/WEB-INF/classes/dream
>     mytest    application name    dream     package name
>     contains
>     template          /* folder name */    System  give me the error message as the following
>
> SEVERE: Servlet.service() for servlet jsp threw exceptionfreemarker.template.TemplateNotFoundException: Template not found for name "/template/away from cold/file.ftl".The name was interpreted by this TemplateLoader: org.apache.struts2.views.freemarker.FreemarkerThemeTemplateLoader@1533de9.        at freemarker.template.Configuration.getTemplate(Configuration.java:1584)        at freemarker.template.Configuration.getTemplate(Configuration.java:1401)        at org.apache.struts2.components.template.FreemarkerTemplateEngine.renderTemplate(FreemarkerTemplateEngine.java:97)        at org.apache.struts2.components.UIBean.mergeTemplate(UIBean.java:584)        at org.apache.struts2.components.UIBean.end(UIBean.java:538)        at org.apache.struts2.views.jsp.ComponentTagSupport.doEndTag(ComponentTagSupport.java:42)        at org.apache.jsp.PropertyPhotoEdit_jsp._jspx_meth_s_005ffile_005f0(PropertyPhotoEdit_jsp.java:293)
>

---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]