Uploaded image for project: 'Struts 2'
  1. Struts 2
  2. WW-3764

Reading(theme.properties)PropertyFileFromFileSystem doesn't include templatePath value from web.xml

    XMLWordPrintableJSON

Details

    • 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;
          }
      

      Attachments

        1. struts2-blank.war
          4.12 MB
          Vijayakannan

        Issue Links

          Activity

            People

              lukaszlenart Lukasz Lenart
              greatvij Vijayakannan
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Time Tracking

                  Estimated:
                  Original Estimate - 24h
                  24h
                  Remaining:
                  Remaining Estimate - 24h
                  24h
                  Logged:
                  Time Spent - Not Specified
                  Not Specified