velocity-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Nathan Bubna <nat...@esha.com>
Subject Re: url resource loader
Date Wed, 03 Mar 2004 19:59:39 GMT
Charles N. Harvey III said:
> Nathan Bubna wrote:
> >Charles N. Harvey III said:
> >
> >>Well, if anyone was wondering, it works.  And it works great.  Thanks
> >>so much for the help.  There were some things that were confusing.
> >>Mostly, the VVS uses the WebAppLoader by default, without telling you.
> >>So you have to explicitly setup the WebAppLoader and then setup the
> >>URLResourceLoader.
> >>
> >really?  i can't quite remember off the top of my head, but i can't see why
> >you would *have* to setup the WebappLoader unless you wanted it.
> >
> That's the thing, I want both.

ah, then you do need to explicitly setup both.

> I want WebappLoader to be the first one
> checked and then URLResourceLoader to be checked second.
> But when I setup the URLResourceLoader in velocity.properties,
> WebappLoader stopped working.
>
> It was because it is not explicitly defined, that when you define another
> loader, the new one you defined is now the only loader.  To have both load
> up I had to define both in velocity.properties.  That's all.

yep, your "resource.loader=whatever" property would override the one the VVS
sets by default ("resource.loader=webapp").

since there's not really any way to remove a configured resource loader, we
have the VVS set the resource loader props *before* loading the user's custom
props (which override defaults) to allow the user the option of not using the
WebappLoader.

> Like, maybe the example should have WebappLoader in velocity.properties.

hmm.  yeah, that might help avoid some confusion.

> Or, even if I define another loader, it looks at WebappLoader first anyway.

this is definitely not gonna happen. :)

> This probably isn't much of a concern for many people, so I wouldn't
> worry about it much.
...

Nathan Bubna
nathan@esha.com


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