You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@struts.apache.org by "Lukasz Lenart (Jira)" <ji...@apache.org> on 2024/06/21 05:59:00 UTC
[jira] [Created] (WW-5432) Replace ClassTemplateLoader with WebappClassTemplateLoader
Lukasz Lenart created WW-5432:
---------------------------------
Summary: Replace ClassTemplateLoader with WebappClassTemplateLoader
Key: WW-5432
URL: https://issues.apache.org/jira/browse/WW-5432
Project: Struts 2
Issue Type: Improvement
Components: Plugin - Tiles
Reporter: Lukasz Lenart
Fix For: 6.5.0
{{FreemarkerManager}} uses custom logic to select from where to load templates:
{code:java}
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)));
}
{code}
yet this can be replaced with {{WebappClassTemplateLoader}} which does the same
--
This message was sent by Atlassian Jira
(v8.20.10#820010)