velocity-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Nathan Bubna" <nbu...@gmail.com>
Subject Re: Ignoring/rewriting SSI commands with VelocityLayoutServlet
Date Wed, 15 Oct 2008 15:49:33 GMT
On Wed, Oct 15, 2008 at 7:16 AM, Serge Knystautas <sknystautas@gmail.com> wrote:
> On Mon, Oct 13, 2008 at 11:30 AM, Nathan Bubna <nbubna@gmail.com> wrote:
>> What version of Velocity, and what does your directive.properties look
>> like now?  Did you redo the numbers or is directive.2 just missing?
>> Is it only #macro that breaks?  Or is that just the first error
>> message you get because Velocity loads your macro library on startup.
>>
>> Macro.java does not internally depend on Include.java, so there's more
>> to this than you allege.
>
> I'm sorry but this is not correct, which is why I wanted to mention it
> on this unanswered user list.  Please refer to a thread I was on on
> July 3rd 2008 with the subject "Velocity arg init issue".  Here is the
> salient message:
>
> =========================
> Wow, figured this one out. :(  I doubt anyone else will hit this, but
> wanted to post it so nobody else wastes their time on this.
>
> The issue is that when the Macro directive initializes itself, when it
> comes across a macro with args, it creates a VMProxyArg.  For reasons
> I don't (need to) grasp, it creates some temporary velocity code that
> uses the Include directive and does a quick parse/evaluate on it.
> Once I re-enabled the include directive, things worked again.
> =========================

Ah, this is why it's important to say what version we're talking
about.  VMProxyArg doesn't even exist anymore.  I searched my local
copy of the trunk for all instances of "Include" and found none in any
macro-related code.  So, perhaps Macro *did* depend on Include, but it
*does* not anymore. :)

Anyway, if you could try removing #include in the trunk, that would be
helpful.  If you're stuck on an old version, you'll probably have to
extend Include, override getName() to return something else
("vinclude?") and replace it in directive.properties, rather than
remove it.  I haven't tried that myself, but it ought to work.

> --
> Serge Knystautas
> Lokitech >> software . strategy . design >> http://www.lokitech.com
> p. 301.656.5501
> e. sergek@lokitech.com
>
> ---------------------------------------------------------------------
> 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


Mime
View raw message