commons-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jörg Schaible <joerg.schai...@gmx.de>
Subject Re: [jexl] custom expressions / registering functions
Date Tue, 25 May 2010 06:38:23 GMT
Adrian Herscu wrote:

> Hi all,
> 
> I am looking for an expression language to using in a testing framework
> that I am designing.
> 
> The requirement is that the users of the framework are allowed to define
> their own functions. I could not find it possible to add a function to a
> JEXL context. Is there any other mechanism?

Why don't you simply use the JavaScript engine (JSR 223)? It comes out of 
the box with Java 6 (including Rhino) and for earlier JDKs you can use 
Apache BSF (http://jakarta.apache.org/bsf/) that implements also JSR 223 and 
provides therefore a smooth upgrade path. With the embedded JavaScript of 
Rhino you can access easily also all Java stuff.

- Jörg


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


Mime
View raw message