velocity-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From lacco <>
Subject Re: WebappResourceLoader: ResourceNotFoundException
Date Mon, 19 Jan 2009 20:44:19 GMT

Okay, it works now: The init method shouldn't be called at all when setting
properties by hand... Besides, the servlet context has to be set. My final

VelocityEngine ve = new VelocityEngine();
ve.setApplicationAttribute("javax.servlet.ServletContext", servletContext);
ve.setProperty("resource.loader", "webapp");
Template t = ve.getTemplate( "petrinet.erdf.vm" );

Thx for the hint with the init method! Some more literature:

Another Thing: The JavaDoc talk about not to use
"" in Velocity Tools 2.X,
but I can't find any stable version. So I am just using velocity tools 1.4,
are there more up-to-date versions out there?
View this message in context:
Sent from the Velocity - User mailing list archive at

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message