Details
-
Improvement
-
Status: Closed
-
Major
-
Resolution: Fixed
-
2.3.1
-
None
-
Tomcat v7.0
-
Important
Description
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; }