[ 
https://issues.apache.org/jira/browse/WW-3764?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14056887#comment-14056887
 ] 

Vijayakannan commented on WW-3764:
----------------------------------

Still java.io.FileNotFoundException

2014-07-09 19:09:13,965 DEBUG (org.apache.struts2.components.UIBean:72) - 
Rendering template /WEB-INF/template/xhtml/a-close
2014-07-09 19:09:13,966 ERROR 
(org.apache.struts2.components.template.FreemarkerTemplateEngine:34) - Could 
not load the FreeMarker template named 'a-close':
2014-07-09 19:09:13,966 ERROR 
(org.apache.struts2.components.template.FreemarkerTemplateEngine:34) - 
Attempted: /WEB-INF/template/xhtml/a-close.ftl
2014-07-09 19:09:13,967 ERROR 
(org.apache.struts2.components.template.FreemarkerTemplateEngine:34) - The 
TemplateLoader provided by the FreeMarker Configuration was a: 
org.apache.struts2.views.freemarker.FreemarkerThemeTemplateLoader
2014-07-09 19:09:13,967 ERROR (org.apache.struts2.components.Anchor:38) - error 
when rendering
java.io.FileNotFoundException: Template /WEB-INF/template/xhtml/a-close.ftl not 
found.
        at freemarker.template.Configuration.getTemplate(Configuration.java:580)

> Reading(theme.properties)PropertyFileFromFileSystem doesn't include 
> templatePath value from web.xml
> ---------------------------------------------------------------------------------------------------
>
>                 Key: WW-3764
>                 URL: https://issues.apache.org/jira/browse/WW-3764
>             Project: Struts 2
>          Issue Type: Improvement
>    Affects Versions: 2.3.1
>         Environment: Tomcat v7.0
>            Reporter: Vijayakannan
>            Assignee: Lukasz Lenart
>              Labels: theme.properties-loading-from-filesystem
>             Fix For: 2.3.18
>
>         Attachments: struts2-blank.war
>
>   Original Estimate: 24h
>  Remaining Estimate: 24h
>
> There is an option in Struts2 to load the freemarker template from path by 
> setting in web.xml (templatePath).Templates are loaded from the file system 
> if we configure the file path.
> Also there is an option to extend the themes by setting the value for 
> "parent" key in the themes.properties within the template folder
> readProperty() method helps us to read the themes.properties file from the 
> file system and also from the classpath
> Aruguments :- 
> Combination of template directory ,template and file name "theme.properties"  
> are passed as propName
> This method doesn't help us to load the theme.properties from the specified 
> templatePath 
> {code:java}
> private InputStream readProperty(String propName) {
>         InputStream is = tryReadingPropertyFileFromFileSystem(propName);
>         if (is == null) {
>             is = readPropertyFromClasspath(propName);
>         }
>         return is;
>     }
> {code}



--
This message was sent by Atlassian JIRA
(v6.2#6252)

Reply via email to