Then I get: org.apache.velocity.exception.ResourceNotFoundException: Unable to find resource 'description.vm'
Obviously Velocity can't find the template because in my deployment it is packaged in the jar file under WEB-INF/lib . Angelo Chen wrote: > > how about just : > > emplate template = Velocity.getTemplate("description.vm"); > > > MoritzGilsdorf wrote: >> >> Hi, >> >> I have that. Here is my code: >> >> props.setProperty(VelocityEngine.RESOURCE_LOADER, "classpath"); >> props.setProperty("classpath." + VelocityEngine.RESOURCE_LOADER + >> ".class",ClasspathResourceLoader.class.getName()); >> engine.init(props); >> >> Then I load my template with this: >> >> Template template = >> Velocity.getTemplate("src/main/resources/templates/description.vm"); >> >> But this location is not in my .war file. Is there maybe something like >> the Path Annotation for Assets to get a reliable path? >> >> Moritz >> >> >> > > -- View this message in context: http://www.nabble.com/T5%3A-Using-resources-tp15618690p15629960.html Sent from the Tapestry - User mailing list archive at Nabble.com. --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]