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

Replace ClassTemplateLoader with WebappClassTemplateLoader

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Closed
    • Minor
    • Resolution: Won't Do
    • None
    • 6.6.0
    • Plugin - Tiles
    • None

    Description

      FreemarkerManager uses custom logic to select from where to load templates:

      if (templatePath.startsWith("class://")) {
          // substring(7) is intentional as we "reuse" the last slash
          templatePathLoader = new ClassTemplateLoader(getClass(), templatePath.substring(7));
      } else if (templatePath.startsWith("file://")) {
          templatePathLoader = new FileTemplateLoader(new File(templatePath.substring(7)));
      }
      

      yet this can be replaced with WebappClassTemplateLoader which does the same

      Attachments

        Activity

          People

            Unassigned Unassigned
            lukaszlenart Lukasz Lenart
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: