code snippet:
// Set freemarker template from classpath Configuration cfg = new Configuration(); cfg.setClassForTemplateLoading(this.getClass(), "/");
Scenario 2: Set freemarker template from directory
code snippet:
// Set freemarker template from directory Configuration cfg = new Configuration(); File ftlDir = new File("deliverable/ftl/"); cfg.setDirectoryForTemplateLoading(ftlDir);
No comments:
Post a Comment