velocity-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Geir Magnusson Jr." <ge...@optonline.net>
Subject Re: Can't load resources in Velocity using the ClasspathResourceLoader
Date Wed, 27 Mar 2002 17:03:00 GMT
On 3/26/02 1:05 PM, "Manish Khettry" <manish.khettry@bdnacorp.com> wrote:

> 
>> From the javadoc on the website!
> 
> http://jakarta.apache.org/velocity/api/org/apache/velocity/runtime/resource/
> loader/ClasspathResourceLoader.html

Ah - thx.  Fixed.

> 
> Also, does it need to be class.resource.loader.class or
> classpath.resource.loader.class?

The idea is that you specify the 'name' you want to refer to it as

 resource.loader = <name>

And then use that name

 <name>.resource.loader.class = <classname>


So I suggested 'class' as the <name> but you could use 'classpath' if you
wanted, or 'cucumber' if you really wanted to :)


> 
> Thanks
> Manish
> 
> 
> -----Original Message-----
> From: Geir Magnusson Jr. [mailto:geirm@optonline.net]
> Sent: Saturday, March 23, 2002 6:26 AM
> To: velocity-user@jakarta.apache.org
> Subject: Re: Can't load resources in Velocity using the
> ClasspathResourceLoader
> 
> 
> On 3/22/02 6:31 PM, "Manish Khettry" <manish.khettry@bdnacorp.com> wrote:
> 
>> 
>> I'm trying to load a velocity template which I've placed in my classpath.
>> 
>> I set the property resource.loader.1.class to
>> org.apache...ClasspathResourceLoader. When I try to make the call to get
> the
>> template and it fails with a ResourceNotFoundException; i.e.
> 
> Whoa!  "resource.loader.1.class"?  That's pre version 1.0 notation.
> 
> Where did you find that?
> 
> The notation to use will be something like :
> 
> resource.loader = class
> 
> class.resource.loader.class =
> org.apache.velocity.runtime.resource.loader.ClasspathResourceLoader
> 
> (on one line, of course...)
> 
> See the examples/servlet_example2 on how to use this.
> 
> geir
> 
> --
> Geir Magnusson Jr.                                     geirm@optonline.net
> System and Software Consulting
> Java : the speed of Smalltalk with the simple elegance of C++...
> 
> 
> --
> 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.                                      geirm@optonline.net
System and Software Consulting
"Whoever would overthrow the liberty of a nation must begin by subduing the
freeness of speech." - Benjamin Franklin



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