JEXL Expression Tutorial

Since I get lots of questions about how to build JEXL expressions in Java, I thought I would write a brief tutorial on how to do this.

The tutorial assumes Rhythmyx 6.5.2 and Eclipse 3.3.0, but other versions will be similar.

Any questions or clarifications, please post a reply in this thread.


I followed the tutorial, and the extension shows up in the System Design view. I also searched to see if the jar was in the Rhythmyx root, and I found it in:


But if I try to run it, rhythmyx doesn’t seem to recognize it. The source I enter into the template doesn’t get interpreted. Here is what I entered into the velocity template (I realize that this will generate an error. I just was testing to see if the extension got recognized):


Instead of generating an error, as I’d hoped it would, it simply prints out the code as if it is an undefined variable.

Also if I type $user into the template, then code completion comes up with other extensions, but not this one.

Am I missing a step? I used the workbench to deploy the jar, following the steps in the tutorial.

Attached is a snapshot of how the extension looks in the workbench.

I got it working. I deleted the extension from the workbench. Then I added it using the deploy.xml file. When I looked at the new extension in the System Design view, I noticed that deploy.xml had added it under the system context.

Once I had done this, then it showed up in autocomplete as:



Then I ran it like this:


And it returned an empty list.


This is a great thread, and it took me very close to get the Extension development setup.

However, I am getting an error, as probably one of the step is not clear to me. I am working on a LINUX box, and so I copied the jar file created to

I copied the deploy.xml file to:

When I run the ant task installExtensions from deploy.xml, I get the following error:
[java] Unable to read extension file: /root/Rhythmyx/AppServer/server/rx/deploy/rxapp.ear/rxapp.war/WEB-INF/Extensions.xml

And this makes sense, as the Extensions.xml is not here. I believe I am putting the deploy.xml to the wrong place.
Where should I put this ant file?


Resolved the issue. It had to with the PSO Toolkit setup in our LINUX env.