Is the sample in this message valid:
http://marc.theaimsgroup.com/?l=jakarta-commons-user&m=111974074105369&w=2

       SomeObject thingy = new SomeObject();
       thingy.setFoo( "Blah" );

       String expr =
           "JEXL let's you do everything you'd do with EL. ${thingy.foo}";

       Expression e = ExpressionFactory.createExpression( expr );
       JexlContext jc = JexlHelper.createContext( );
       jc.getVars( ).put("thingy", thingy);
       String message = (String) e.evaluate(jc);

I need this functionality in my app.  I tried out the code above but got this:

org.apache.commons.jexl.parser.ParseException: Encountered "let" at
line 1, column 6.
Was expecting one of:
   "||" ...
   ... etc ...
        at 
org.apache.commons.jexl.parser.Parser.generateParseException(Parser.java:3274)
     ... etc ...

What's the proper way of evaluating "expr" in the sample above using JEXL?

thanks,
Hubert

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to