You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@velocity.apache.org by Brad Eisan <br...@5star-network.com> on 2005/01/31 13:07:00 UTC
Re: Map not working in velocity??
On 31 Jan 2005, at 12:07, Manish wrote:
> well, I am astonished as hell to see that Map is not working velocity.
> I have declared it properly,
> #set( $another_map = {"banana" : "good", "roast beef" : "bad"})
>
> but I get this error -
> Lexical error: org.apache.velocity.runtime.parser.TokenMgrError:
> Lexical
> error at line 14, column 22. Encountered: "{" (123), after : ""
> org.apache.velocity.exception.ParseErrorException: Lexical error:
> org.apache.velocity.runtime.parser.TokenMgrError: Lexical error at
> line 14,
> column 22. Encountered: "{" (123), after : ""
> at org.apache.velocity.Template.process(Template.java:141)
> at
> org.apache.velocity.runtime.resource.ResourceManagerImpl.loadResource(R
> esour
> ceManagerImpl.java:423)
> at
> org.apache.velocity.runtime.resource.ResourceManagerImpl.getResource(Re
> sourc
> eManagerImpl.java:341)
> at
> org.apache.velocity.runtime.RuntimeInstance.getTemplate(RuntimeInstance
> .java
> :831)
> at
> org.apache.velocity.runtime.RuntimeInstance.getTemplate(RuntimeInstance
> .java
> :813)
> at
> org.apache.velocity.runtime.RuntimeSingleton.getTemplate(RuntimeSinglet
> on.ja
> va:285)
>
> Please help!!!
Maps are not yet available in 1.4 .. See the below post ..
http://mail-archives.apache.org/eyebrowse/ReadMsg?listName=velocity-
user@jakarta.apache.org&msgId=2000911
Cheers,
Brad
---------------------------------------------------------------------
To unsubscribe, e-mail: velocity-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: velocity-user-help@jakarta.apache.org
Re: Map not working in velocity??
Posted by Manish <te...@gmx.net>.
But I have seen lot of people mentioning here about using Maps, how do they
do it?
- Manish
----- Original Message -----
From: "Brad Eisan" <br...@5star-network.com>
To: "Velocity Users List" <ve...@jakarta.apache.org>
Sent: Monday, January 31, 2005 5:37 PM
Subject: Re: Map not working in velocity??
> On 31 Jan 2005, at 12:07, Manish wrote:
>
> > well, I am astonished as hell to see that Map is not working velocity.
> > I have declared it properly,
> > #set( $another_map = {"banana" : "good", "roast beef" : "bad"})
> >
> > but I get this error -
> > Lexical error: org.apache.velocity.runtime.parser.TokenMgrError:
> > Lexical
> > error at line 14, column 22. Encountered: "{" (123), after : ""
> > org.apache.velocity.exception.ParseErrorException: Lexical error:
> > org.apache.velocity.runtime.parser.TokenMgrError: Lexical error at
> > line 14,
> > column 22. Encountered: "{" (123), after : ""
> > at org.apache.velocity.Template.process(Template.java:141)
> > at
> > org.apache.velocity.runtime.resource.ResourceManagerImpl.loadResource(R
> > esour
> > ceManagerImpl.java:423)
> > at
> > org.apache.velocity.runtime.resource.ResourceManagerImpl.getResource(Re
> > sourc
> > eManagerImpl.java:341)
> > at
> > org.apache.velocity.runtime.RuntimeInstance.getTemplate(RuntimeInstance
> > .java
> > :831)
> > at
> > org.apache.velocity.runtime.RuntimeInstance.getTemplate(RuntimeInstance
> > .java
> > :813)
> > at
> > org.apache.velocity.runtime.RuntimeSingleton.getTemplate(RuntimeSinglet
> > on.ja
> > va:285)
> >
> > Please help!!!
>
> Maps are not yet available in 1.4 .. See the below post ..
>
> http://mail-archives.apache.org/eyebrowse/ReadMsg?listName=velocity-
> user@jakarta.apache.org&msgId=2000911
>
> Cheers,
> Brad
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: velocity-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: velocity-user-help@jakarta.apache.org
>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: velocity-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: velocity-user-help@jakarta.apache.org
Re: Map not working in velocity??
Posted by Shinobu Kawai Yoshida <sh...@gmail.com>.
Hi Manish,
> But I have seen lot of people mentioning here about using Maps, how do they
> do it?
Easy, just compile it from the latest source in SVN. :)
http://jakarta.apache.org/velocity/developer-guide.html
Best regards,
-- Shinobu
--
Shinobu "Kawai" Yoshida <sh...@gmail.com>
---------------------------------------------------------------------
To unsubscribe, e-mail: velocity-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: velocity-user-help@jakarta.apache.org
Re: Map not working in velocity??
Posted by Manish <pr...@gmx.net>.
But I have seen lot of people mentioning here about using Maps, how do they
do it?
- Manish
----- Original Message -----
From: "Brad Eisan" <br...@5star-network.com>
To: "Velocity Users List" <ve...@jakarta.apache.org>
Sent: Monday, January 31, 2005 5:37 PM
Subject: Re: Map not working in velocity??
> On 31 Jan 2005, at 12:07, Manish wrote:
>
> > well, I am astonished as hell to see that Map is not working velocity.
> > I have declared it properly,
> > #set( $another_map = {"banana" : "good", "roast beef" : "bad"})
> >
> > but I get this error -
> > Lexical error: org.apache.velocity.runtime.parser.TokenMgrError:
> > Lexical
> > error at line 14, column 22. Encountered: "{" (123), after : ""
> > org.apache.velocity.exception.ParseErrorException: Lexical error:
> > org.apache.velocity.runtime.parser.TokenMgrError: Lexical error at
> > line 14,
> > column 22. Encountered: "{" (123), after : ""
> > at org.apache.velocity.Template.process(Template.java:141)
> > at
> > org.apache.velocity.runtime.resource.ResourceManagerImpl.loadResource(R
> > esour
> > ceManagerImpl.java:423)
> > at
> > org.apache.velocity.runtime.resource.ResourceManagerImpl.getResource(Re
> > sourc
> > eManagerImpl.java:341)
> > at
> > org.apache.velocity.runtime.RuntimeInstance.getTemplate(RuntimeInstance
> > .java
> > :831)
> > at
> > org.apache.velocity.runtime.RuntimeInstance.getTemplate(RuntimeInstance
> > .java
> > :813)
> > at
> > org.apache.velocity.runtime.RuntimeSingleton.getTemplate(RuntimeSinglet
> > on.ja
> > va:285)
> >
> > Please help!!!
>
> Maps are not yet available in 1.4 .. See the below post ..
>
> http://mail-archives.apache.org/eyebrowse/ReadMsg?listName=velocity-
> user@jakarta.apache.org&msgId=2000911
>
> Cheers,
> Brad
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: velocity-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: velocity-user-help@jakarta.apache.org
>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: velocity-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: velocity-user-help@jakarta.apache.org