velocity-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Nathan Bubna <nbu...@gmail.com>
Subject Re: Creating maps on the fly
Date Thu, 23 Dec 2010 06:48:06 GMT
Yeah, i'm pretty sure maps came in 1.5, but that was eons ago, so i'm
not sure my memory is reliable.

On Wed, Dec 22, 2010 at 1:07 PM, Christopher Schultz
<chris@christopherschultz.net> wrote:
> All,
>
> Using Velocity 1.4, I'm trying to create an in-page hash for quick
> lookups. I have the following syntax:
>
> #set($hash = { })
>
> This is causing an error:
>
> org.apache.velocity.exception.ParseErrorException: Lexical error:
> org.apache.velocity.runtime.parser.TokenMgrError: Lexical error at line
> 6, column 17.  Encountered: &quot;{&quot; (123), after : &quot;&quot;
>        at org.apache.velocity.Template.process(Template.java:141)
>        at
> org.apache.velocity.runtime.resource.ResourceManagerImpl.loadResource(ResourceManagerImpl.java:423)
>    ...
>
> I've even tried #set($hash = { "":"" }) just in case empty hashes aren't
> supported, and I get a similar error.
>
> When was this syntax added to Velocity? Am I just running a version that
> is too old?
>
> Thanks,
> -chris
>
>

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


Mime
View raw message