Hi All!
In my project, I want to use Velocity to evaluate user-defined expressions
like:
$a + $b
How can I do that? It seems that I cannot use such an expression in a
template directly. Then I tried to use #set directive:
#set ($temp = $a + $b)
$temp
It works well, but I doubt if there is a method provided in Velocity such as:
Object o = Velocity.eval(vc, "$a + $b");
Could you give me an answer on this point? I need your help. Thanks a lot!
Best Regards,
bluejoe
- How Can I Evaluate an Expression in Velocity? bluejoe
- Re: How Can I Evaluate an Expression in V... Walid "jo" Gedeon
- Re: How Can I Evaluate an Expression in V... Nathan Bubna
- Re: How Can I Evaluate an Expression ... Will Glass-Husain
- Re: How Can I Evaluate an Express... Nathan Bubna
