Hello everybody,
this question is somewhat related to this question: StackOverflow: Howto load a resource from WEB-INF directory of a web archive
I want to use StringTemplate and want to load my templates via a StringTemplateGroup. Until know I use the method shown in the related question to get single files from the WEB-INF folder, but as I read here, it is considered bad practice to load the templates via a path as the application could be inside a WAR file AND I can not use the StringTemplateGroup because of the path.
Is there a way to achieve this that you would recommend? Can I get the entire folder as a stream-like object for the StringTemplateGroup to read or is there a decent (and not so hackish) way already implemented in StringTemplate?
I am somewhat new to Java but willing to learn :) Thank you very much in advance.