struts-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Vijayakannan (JIRA)" <>
Subject [jira] [Commented] (WW-3764) Reading( doesn't include templatePath value from web.xml
Date Wed, 09 Jul 2014 03:24:04 GMT


Vijayakannan commented on WW-3764:

Issue is not yet resolved. We will focus first issue now.
Steps to reproduce	

1.	Configure the struts2-blank.war & execute it and make sure that the application is
working fine
2.	Add the below lines in Struts.xml. This will help us to load the template file from application
Path instead of loading it from struts2-core JAR. We will face the performance issue if it’s
loaded from it. Refer WW-3765
<constant name="struts.ui.templateDir" value="WEB-INF/template"/>
3.	Extract the struts2-core Jar and copy the “template” folder and place it in WEB-INF
4.	Execute the Project and we will get the FileNotFoundException

Please inform me if you are not understand the issue clearly

> Reading( doesn't include templatePath value
from web.xml
> ---------------------------------------------------------------------------------------------------
>                 Key: WW-3764
>                 URL:
>             Project: Struts 2
>          Issue Type: Improvement
>    Affects Versions: 2.3.1
>         Environment: Tomcat v7.0
>            Reporter: Vijayakannan
>            Assignee: Lukasz Lenart
>              Labels:
>             Fix For: 2.3.18
>   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
> Also there is an option to extend the themes by setting the value for "parent" key in
the within the template folder
> readProperty() method helps us to read the file from the file system
and also from the classpath
> Aruguments :- 
> Combination of template directory ,template and file name ""  are passed
as propName
> This method doesn't help us to load the 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

View raw message