this question is somewhat related to this question: stack overflow
I want to use a StringTemplate and want to load my templates through a StringTemplateGroup. Until I use the method shown in the corresponding question to get individual files from the WEB-INF folder, but since I read here , it is considered wrong practice to load templates along the way, because the application may be inside the WAR file, and I cannot use StringTemplateGroup because of the path.
Is there any way you would recommend this? Can I get the entire folder as a stream-like object to read a StringTemplateGroup string, or is there a decent (and not so hacky) way already implemented in StringTemplate?
I'm a little new to Java, but I want to learn :) Thank you so much in advance.
source
share