velocity-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Geir Magnusson Jr." <>
Subject Re: RNFE
Date Wed, 03 Jul 2002 15:25:58 GMT
On 7/3/02 11:13 AM, "Kevin Baynes" <> wrote:

> I'm still working on this ResourceNotFoundException in Tomcat4 (detailed
> email yesterday).
> I'm switching from ClasspathResourceLoader to FileResourceLoader for
> testing.
> Using "file.resource.loader.path = templates" in my properties, what is the
> expected location of the "templates" folder? In relation to what does
> Velocity look for that directory?

Velocity has no knowledge or expectation about working in the servlet
environment.  It assumes 'current working directory' for anything relative
(which everything must be...)

So what people tend to do is (in order of my preference)

0)  WebappResourceLoader from velocity tools. (I think that's what it's
called - between meetings so can't check)

1) Classpath resource loader : put the templates in a jar and toss in

2) File resource loader : put a file.rsc.ldr.pth in the vel props, but then
let the servlet API tell you the absolute location.  This is the worst as it
won't always work in general servlet deployment.  However, for development,
its nice.  See the examples/servlet_example2 example

Geir Magnusson Jr. 
Research & Development, Adeptra Inc.

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

View raw message