I have been fighting with Velocity for a day now. I think I have read every google page I found. Can anyone help?
I am using this in a web app. I have a template just under the /web/ directory and it cannot find it. It shows the actual path when I print it to the console but alas I am stumped.
Getting this error.
org.apache.velocity.exception.ResourceNotFoundExce ption: Unable to find resource 'testTemplate.vm'
Properties p = new Properties();
p.setProperty("file.resource.loader.class","org.apache.velocity.runtime.resource.loader.ClasspathResourceLoader");
p.setProperty("resource.loader", "templateName");
p.setProperty( "file.resource.loader.path", "/web/");//I have tried a lot of things here in this line
Velocity.init(p);
VelocityContext context = new VelocityContext();
template = Velocity.getTemplate(templateName);