velocity-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Bradley Wagner <bradley.wag...@hannonhill.com>
Subject ClasspathResourceLoader with/without leading slash
Date Mon, 17 Jul 2006 19:32:00 GMT
I'm using Velocity-1.4 and I'm experiencing problems with loading  
templates using the ClasspathResourceLoader. Basically, the only way  
I can get it to work is by dropping the leading slash on my absolute  
classpath.

Template template = Velocity.getTemplate("class/path/to/file")

Also, is there any way to reference something relative to your  
current class as you can do with the resource loader in Java?

MyClass.class.getResourceAsStream("./relative/to/current")

Thanks,
Bradley

---------------------------------------------------------------------
To unsubscribe, e-mail: velocity-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: velocity-user-help@jakarta.apache.org


Mime
View raw message