I am using Velocity templates which I store in src/main/webapp/templates
.
My Jersey-based REST service needs to find these templates. Locally in my Eclipse (with Sysdeo plugin), I used
p.setProperty("resource.loader", "class");
p.setProperty("class.resource.loader.class",
"org.apache.velocity.runtime.resource.loader.ClasspathResourceLoader");
to make Tomcat find the templates (which I got from https://stackoverflow.com/a/38812523/927493). Now when I deploy the war to a "real" Tomcat, the resources are not found (Unable to find resource 'templates/FreigabeNeu.vm')
I probably have to set the properties to something different, but I just don't find how I need to do it.
I checked that the templates
directory indeed is copied to the main directory of the war.