velocity-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Geir Magnusson Jr." <ge...@adeptra.com>
Subject Re: RNFE
Date Wed, 03 Jul 2002 15:25:58 GMT
On 7/3/02 11:13 AM, "Kevin Baynes" <kbaynes@seagullsw.com> 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
WEB-INF/lib

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.
geirm@adeptra.com
+1-203-247-1713



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


Mime
View raw message