I have a web application that I need to manually obtain a Freemarker template - the template is obtained via a class in a library project, but the actual tpl file is contain
this is what ended up working for me:
freemarkerConfiguration = new Configuration(Configuration.VERSION_2_3_28); freemarkerConfiguration.setClassForTemplateLoading(this.getClass(), "/"); Template freemarkerTemplate = freemarkerConfiguration.getTemplate("email/vendor.tpl");