Discussion:
[FreeMarker-user] template
tomaz
2012-06-21 09:32:23 UTC
Permalink
Where is freemarker searching for templates in web application as war on Tomcat or Glassfish?

Or what is the best way to ship templates in war?

Regards, Tomaz
Daniel Dekany
2012-06-21 15:44:15 UTC
Permalink
Post by tomaz
Where is freemarker searching for templates in web application as war on Tomcat or Glassfish?
There's no standard location as far as FreeMarker is concerned. It's
up to the developers of the Web Application Framework (like Spring,
Struts, Stripes, etc.) or of the application.
Post by tomaz
Or what is the best way to ship templates in war?
If it's up to you, then maybe put them under WEB-INF/templates and
then configure FreeMarker with
cfg.setServletContextForTemplateLoading(servletContext,
"/WEB-INF/templates").
Post by tomaz
Regards, Tomaz
--
Best regards,
Daniel Dekany
Loading...