You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@velocity.apache.org by ChadDavis <ch...@gmail.com> on 2010/03/26 23:00:42 UTC

resource loaders

It seems that one of my resource loaders is not being called as I
expected.  I configure my  velocity engine to use a custom defined
loader, in front of the classpath loader.  The template that I'm
merging is being located, as expected, by my custom loader.  However,
it seems to not be included in the location of a template that I
reference within the main template with a parse statement . . . is
this possible?  Aren't all parse and includes in a template subject to
the exact same velocityEngine with the exact same configuration of
loaders?

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


Re: resource loaders

Posted by ChadDavis <ch...@gmail.com>.
On Fri, Mar 26, 2010 at 5:03 PM, Nathan Bubna <nb...@gmail.com> wrote:
> On Fri, Mar 26, 2010 at 3:00 PM, ChadDavis <ch...@gmail.com> wrote:
>> It seems that one of my resource loaders is not being called as I
>> expected.  I configure my  velocity engine to use a custom defined
>> loader, in front of the classpath loader.  The template that I'm
>> merging is being located, as expected, by my custom loader.  However,
>> it seems to not be included in the location of a template that I
>> reference within the main template with a parse statement . . . is
>> this possible?
>
> Many things are...
>
>> Aren't all parse and includes in a template subject to
>> the exact same velocityEngine with the exact same configuration of
>> loaders?
>
> Often.  But there are ways to alter things (e.g. IncludeEventHandlers).
>

Thanks for the tip.  The IncludeEventHandler calls the resourceExists
method of my custom loader; I hadn't implemented my custom logic in
that method yet, so the behaviour appeared odd.

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


Re: resource loaders

Posted by Nathan Bubna <nb...@gmail.com>.
On Fri, Mar 26, 2010 at 3:00 PM, ChadDavis <ch...@gmail.com> wrote:
> It seems that one of my resource loaders is not being called as I
> expected.  I configure my  velocity engine to use a custom defined
> loader, in front of the classpath loader.  The template that I'm
> merging is being located, as expected, by my custom loader.  However,
> it seems to not be included in the location of a template that I
> reference within the main template with a parse statement . . . is
> this possible?

Many things are...

> Aren't all parse and includes in a template subject to
> the exact same velocityEngine with the exact same configuration of
> loaders?

Often.  But there are ways to alter things (e.g. IncludeEventHandlers).

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

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