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:50:33 GMT
On 7/3/02 11:41 AM, "Kevin Baynes" <kbaynes@seagullsw.com> wrote:

> Thanks.
> 
> I think it's called JarResourceLoader, that was the closest thing I could
> find. I'll try it.

No :)  That's the JarResourceLoader.

The one I am talking about is in the velocity-tools project, in the view
subdirectory.

It's called the WebappLoader. I use it exclusively now in workflow engine
I'm building - it's perfect for me...

> 
> I've been using the ClasspathResourceLoader with success in every container
> except Tomcat 4. That's my problem. :-(

Ah - sorry - wasn't paying attention to the thread yest. The classloader
model in TC4 is different than TC3 (the diff is between servlet spec 2.2 vs
2.3).  We'll have to chase this down - actually, I think I know what it is.
A friend recommended a soln.  If you are interested, I'll try to wedge the
fix in this 4 day weekend (as well as release 1.3 :), and if you could try
it that would be great.

I would try the webapploader - as I used that much in Tomcat 4 as well as
Jetty. 

> 
> ~Kevin
> 
>> -----Original Message-----
>> From: Geir Magnusson Jr. [mailto:geirm@adeptra.com]
>> Sent: Wednesday, July 03, 2002 11:26 AM
>> To: velocity-user@jakarta.apache.org
>> Subject: Re: RNFE
>> 
>> 
>> 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>
> 
> 
> --
> To unsubscribe, e-mail:
> <mailto:velocity-user-unsubscribe@jakarta.apache.org>
> For additional commands, e-mail:
> <mailto:velocity-user-help@jakarta.apache.org>
> 

-- 
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