Hi!

I tried to get Velocity working with WebappResourceLoader for a web project.
My current code:

Properties props = new Properties();
props.setProperty("resource.loader=webapp", "webapp");
props.setProperty("webapp.resource.loader.class",
"org.apache.velocity.tools.view.WebappResourceLoader");
props.setProperty("webapp.resource.loader.path",
"/WEB-INF/classes/my/package");
VelocityEngine ve = new VelocityEngine(props);
ve.init();
Template t = ve.getTemplate( "my.template.vm" );

I only want to use Velocity right now at one place and would like to set the
properties in the code (with no configuration file). Although "C:\Program
Files\Apache Software Foundation\Tomcat
6.0\webapps\my_project\WEB-INF\classes\my\package\my.template.vm" exists, I
get a ResourceNotFoundException when calling getTemplate - what am I doing
wrong?

Thx!
-- 
View this message in context: 
http://www.nabble.com/WebappResourceLoader%3A-ResourceNotFoundException-tp21548077p21548077.html
Sent from the Velocity - User mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to