You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@struts.apache.org by "Vijayakannan (Created) (JIRA)" <ji...@apache.org> on 2012/02/22 17:35:49 UTC
[jira] [Created] (WW-3764)
Reading(theme.properties)PropertyFileFromFileSystem doesn't include
templatePath value from web.xml
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: Temp
Affects Versions: 2.3.1
Environment: Tomcat v7.0
Reporter: Vijayakannan
Fix For: 2.5.x
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
private InputStream readProperty(String propName) {
InputStream is = tryReadingPropertyFileFromFileSystem(propName);
if (is == null) {
is = readPropertyFromClasspath(propName);
}
return is;
}
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Updated] (WW-3764)
Reading(theme.properties)PropertyFileFromFileSystem doesn't include
templatePath value from web.xml
Posted by "Lukasz Lenart (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/WW-3764?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Lukasz Lenart updated WW-3764:
------------------------------
Fix Version/s: (was: 2.3.x)
2.3.4
> 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: Temp
> Affects Versions: 2.3.1
> Environment: Tomcat v7.0
> Reporter: Vijayakannan
> Assignee: Lukasz Lenart
> Labels: theme.properties-loading-from-filesystem
> Fix For: 2.3.4
>
> 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
> private InputStream readProperty(String propName) {
> InputStream is = tryReadingPropertyFileFromFileSystem(propName);
> if (is == null) {
> is = readPropertyFromClasspath(propName);
> }
> return is;
> }
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Updated] (WW-3764)
Reading(theme.properties)PropertyFileFromFileSystem doesn't include
templatePath value from web.xml
Posted by "Lukasz Lenart (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/WW-3764?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Lukasz Lenart updated WW-3764:
------------------------------
Fix Version/s: (was: 2.3.5)
2.3.6
> 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.6
>
> 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
> private InputStream readProperty(String propName) {
> InputStream is = tryReadingPropertyFileFromFileSystem(propName);
> if (is == null) {
> is = readPropertyFromClasspath(propName);
> }
> return is;
> }
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Commented] (WW-3764)
Reading(theme.properties)PropertyFileFromFileSystem doesn't include
templatePath value from web.xml
Posted by "Lukasz Lenart (Commented) (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/WW-3764?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13248612#comment-13248612 ]
Lukasz Lenart commented on WW-3764:
-----------------------------------
theme.properties are loaded from struts.ui.templateDir if specified. Or do I miss something ?
> 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: Temp
> Affects Versions: 2.3.1
> Environment: Tomcat v7.0
> Reporter: Vijayakannan
> Labels: theme.properties-loading-from-filesystem
> Fix For: 2.5.x
>
> 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
> private InputStream readProperty(String propName) {
> InputStream is = tryReadingPropertyFileFromFileSystem(propName);
> if (is == null) {
> is = readPropertyFromClasspath(propName);
> }
> return is;
> }
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Commented] (WW-3764)
Reading(theme.properties)PropertyFileFromFileSystem doesn't include
templatePath value from web.xml
Posted by "Lukasz Lenart (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/WW-3764?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13454657#comment-13454657 ]
Lukasz Lenart commented on WW-3764:
-----------------------------------
Could you prepare a small example application as I cannot grasp where the problem is :/
> 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.5
>
> 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
> private InputStream readProperty(String propName) {
> InputStream is = tryReadingPropertyFileFromFileSystem(propName);
> if (is == null) {
> is = readPropertyFromClasspath(propName);
> }
> return is;
> }
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Commented] (WW-3764)
Reading(theme.properties)PropertyFileFromFileSystem doesn't include
templatePath value from web.xml
Posted by "Lukasz Lenart (Commented) (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/WW-3764?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13217562#comment-13217562 ]
Lukasz Lenart commented on WW-3764:
-----------------------------------
Did you try to configure struts.ui.templateDir ?
> 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: Temp
> Affects Versions: 2.3.1
> Environment: Tomcat v7.0
> Reporter: Vijayakannan
> Labels: theme.properties-loading-from-filesystem
> Fix For: 2.5.x
>
> 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
> private InputStream readProperty(String propName) {
> InputStream is = tryReadingPropertyFileFromFileSystem(propName);
> if (is == null) {
> is = readPropertyFromClasspath(propName);
> }
> return is;
> }
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Updated] (WW-3764)
Reading(theme.properties)PropertyFileFromFileSystem doesn't include
templatePath value from web.xml
Posted by "Lukasz Lenart (Updated) (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/WW-3764?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Lukasz Lenart updated WW-3764:
------------------------------
Fix Version/s: (was: 2.5.x)
2.3.x
> 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: Temp
> Affects Versions: 2.3.1
> Environment: Tomcat v7.0
> Reporter: Vijayakannan
> Labels: theme.properties-loading-from-filesystem
> Fix For: 2.3.x
>
> 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
> private InputStream readProperty(String propName) {
> InputStream is = tryReadingPropertyFileFromFileSystem(propName);
> if (is == null) {
> is = readPropertyFromClasspath(propName);
> }
> return is;
> }
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Assigned] (WW-3764)
Reading(theme.properties)PropertyFileFromFileSystem doesn't include
templatePath value from web.xml
Posted by "Lukasz Lenart (Assigned) (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/WW-3764?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Lukasz Lenart reassigned WW-3764:
---------------------------------
Assignee: Lukasz Lenart
> 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: Temp
> Affects Versions: 2.3.1
> Environment: Tomcat v7.0
> Reporter: Vijayakannan
> Assignee: Lukasz Lenart
> Labels: theme.properties-loading-from-filesystem
> Fix For: 2.3.x
>
> 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
> private InputStream readProperty(String propName) {
> InputStream is = tryReadingPropertyFileFromFileSystem(propName);
> if (is == null) {
> is = readPropertyFromClasspath(propName);
> }
> return is;
> }
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Commented] (WW-3764)
Reading(theme.properties)PropertyFileFromFileSystem doesn't include
templatePath value from web.xml
Posted by "Vijayakannan (Commented) (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/WW-3764?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13249306#comment-13249306 ]
Vijayakannan commented on WW-3764:
----------------------------------
Hope you have understand the above mentioned issue.
Issue # 2 in the ticket
struts.xml
<constant name="struts.ui.templateDir" value="struts-template"></constant>
web.xml
<context-param>
<param-name>TemplatePath</param-name>
<param-value>file://D://templates</param-value>
</context-param>
The purpose of TemplatePath is more powerful when compare to others, since it helps us to load the template from file system.
when i try to load the template from file system, i am getting FileNotException.
java.io.FileNotFoundException: Template /struts-template/xhtml/a.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(FreemarkerTemplateEngine.java:96)
Root Cause:
BaseTemplateEngine.java loadProperties(String propName) method doesn't include TemplatePath which is defined in web.xml.
private InputStream readProperty(String propName) {
InputStream is = tryReadingPropertyFileFromFileSystem(propName);
if (is == null) { is = readPropertyFromClasspath(propName); }
return is;
}
In my case , propName is "struts-template/xhtml/theme.properties"
Please note i have raise two related problem in this ticket.
Thanks in advance
> 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: Temp
> Affects Versions: 2.3.1
> Environment: Tomcat v7.0
> Reporter: Vijayakannan
> Labels: theme.properties-loading-from-filesystem
> Fix For: 2.3.x
>
> 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
> private InputStream readProperty(String propName) {
> InputStream is = tryReadingPropertyFileFromFileSystem(propName);
> if (is == null) {
> is = readPropertyFromClasspath(propName);
> }
> return is;
> }
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Commented] (WW-3764)
Reading(theme.properties)PropertyFileFromFileSystem doesn't include
templatePath value from web.xml
Posted by "Vijayakannan (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/WW-3764?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13268533#comment-13268533 ]
Vijayakannan commented on WW-3764:
----------------------------------
Lukasz Lenart Any updates ?
> 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: Temp
> Affects Versions: 2.3.1
> Environment: Tomcat v7.0
> Reporter: Vijayakannan
> Assignee: Lukasz Lenart
> Labels: theme.properties-loading-from-filesystem
> Fix For: 2.3.x
>
> 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
> private InputStream readProperty(String propName) {
> InputStream is = tryReadingPropertyFileFromFileSystem(propName);
> if (is == null) {
> is = readPropertyFromClasspath(propName);
> }
> return is;
> }
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Updated] (WW-3764)
Reading(theme.properties)PropertyFileFromFileSystem doesn't include
templatePath value from web.xml
Posted by "Vijayakannan (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/WW-3764?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Vijayakannan updated WW-3764:
-----------------------------
Issue Type: Improvement (was: Temp)
> 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.4
>
> 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
> private InputStream readProperty(String propName) {
> InputStream is = tryReadingPropertyFileFromFileSystem(propName);
> if (is == null) {
> is = readPropertyFromClasspath(propName);
> }
> return is;
> }
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Commented] (WW-3764)
Reading(theme.properties)PropertyFileFromFileSystem doesn't include
templatePath value from web.xml
Posted by "Vijayakannan (Commented) (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/WW-3764?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13249177#comment-13249177 ]
Vijayakannan commented on WW-3764:
----------------------------------
Root cause for the above Exception:
FreemarkerTemplateEngine.java :- List<Template> templates = templateContext.getTemplate().getPossibleTemplates(this);
The above method call BaseTemplateEngine.java loadProperties(String propName) method to load the theme.properties for the template.
This method internally calls readProperty(String propName)method to load the properties file from file system /class path but not from application path.
private Properties loadProperties(String propName) {
InputStream is = readProperty(propName);
Properties props = new Properties();
if (is != null) {
tryToLoadPropertiesFromStream(props, propName, is);
}
return props;
}
private InputStream readProperty(String propName) {
InputStream is = tryReadingPropertyFileFromFileSystem(propName);
if (is == null) {
is = readPropertyFromClasspath(propName);
}
return is;
}
Value of propName in my case ="WEB-INF/template/xhtml/theme.properties"
Please create unit test case for the loadProperties("WEB-INF/template/xhtml/theme.properties") method to understand the problem more details.
> 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: Temp
> Affects Versions: 2.3.1
> Environment: Tomcat v7.0
> Reporter: Vijayakannan
> Labels: theme.properties-loading-from-filesystem
> Fix For: 2.5.x
>
> 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
> private InputStream readProperty(String propName) {
> InputStream is = tryReadingPropertyFileFromFileSystem(propName);
> if (is == null) {
> is = readPropertyFromClasspath(propName);
> }
> return is;
> }
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Updated] (WW-3764)
Reading(theme.properties)PropertyFileFromFileSystem doesn't include
templatePath value from web.xml
Posted by "Lukasz Lenart (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/WW-3764?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Lukasz Lenart updated WW-3764:
------------------------------
Fix Version/s: (was: 2.3.4)
2.3.5
> 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.5
>
> 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
> private InputStream readProperty(String propName) {
> InputStream is = tryReadingPropertyFileFromFileSystem(propName);
> if (is == null) {
> is = readPropertyFromClasspath(propName);
> }
> return is;
> }
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Commented] (WW-3764)
Reading(theme.properties)PropertyFileFromFileSystem doesn't include
templatePath value from web.xml
Posted by "Lukasz Lenart (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/WW-3764?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13272644#comment-13272644 ]
Lukasz Lenart commented on WW-3764:
-----------------------------------
No, I'll postpone it till 2.3.5
> 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.4
>
> 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
> private InputStream readProperty(String propName) {
> InputStream is = tryReadingPropertyFileFromFileSystem(propName);
> if (is == null) {
> is = readPropertyFromClasspath(propName);
> }
> return is;
> }
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Commented] (WW-3764)
Reading(theme.properties)PropertyFileFromFileSystem doesn't include
templatePath value from web.xml
Posted by "Vijayakannan (Commented) (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/WW-3764?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13249167#comment-13249167 ]
Vijayakannan commented on WW-3764:
----------------------------------
When i try to load the struts default template from application path "/WEB-INF/template" by setting struts.ui.templateDir in stuts.xml, i am geting this Exception.
SEVERE: Could not open template
java.io.FileNotFoundException: Template /WEB-INF/template/xhtml/a.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(FreemarkerTemplateEngine.java:96)
at org.apache.struts2.components.UIBean.mergeTemplate(UIBean.java:559)
at org.apache.struts2.components.ClosingUIBean.start(ClosingUIBean.java:59)
at org.apache.struts2.components.Anchor.start(Anchor.java:132)
at org.apache.struts2.views.jsp.ComponentTagSupport.doStartTag(ComponentTagSupport.java:53)
> 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: Temp
> Affects Versions: 2.3.1
> Environment: Tomcat v7.0
> Reporter: Vijayakannan
> Labels: theme.properties-loading-from-filesystem
> Fix For: 2.5.x
>
> 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
> private InputStream readProperty(String propName) {
> InputStream is = tryReadingPropertyFileFromFileSystem(propName);
> if (is == null) {
> is = readPropertyFromClasspath(propName);
> }
> return is;
> }
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira