Why you didn't know the Unified EL is being updated

August 02, 2009

Information about the proposed Unified EL update slated for Java EE 6 is hard to come by, so I decided to put together a blog entry with some useful links.

If you haven't heard yet, which is understandable given the lack of publicized information, the Unified EL is getting an update for Java EE 6. The update consists of functionality we have all wanted for a long time. Most notably, literal method names in value expressions for more flexible data retrieval and method arguments for both value and method expressions. To see examples of these feature enhancements, take a look at this blog entry by Kim-Man Chung. (If you are using Seam or Spring Web Flow, you are already enjoying these enhancements courtesy of the JBoss EL).

But you probably don't just want to take my word for it. You want to know where these enhancements are officially documented. That's the point of this entry :)

Let's start by looking at the big picture. The Unified EL is defined in Part II of the JSR 245: JavaServer Pages 2.1 specification, lead by Kim-Man Chung. The maintainence release 2 of JSR 245 is the one on the ballot for Java EE 6.

I'll pause in anticipation of your pressing question. No, there is no dedicated specification for the Unified EL. (I'm lobbying for one, though). The Unified EL evolved out of JSP (where it was just the EL) and was later adopted by JSF. It's just as much a part of JSF as it is a part of JSP, which is why the situation is so awkward right now.

To find the proposed changes for the Unified EL, you have to look at the JSR 245 MR2 Change Log. Specifically, focus your attention on the Expression Language page. Believe it not, that's as official as it gets. Trust me, the absence of process disturbs me too.

Great, so what about the implementation? Can you try this stuff out? I had some difficulty finding that information too, but alas, I have more links for you.

The reference implementation of the Unified EL is hosted at java.net. The project is named uel, short for Unified EL. There are several tags corresponding to beta releases in the Subversion repository and the artifacts (JARs) for most of the beta releases have been published to the java.net Maven repository (EL api, EL impl). However, I can't find any announcements about these releases.

The version of the Unified EL you are looking for is 2.1.2. "How did the version jump from 1.1 to 2.1.2?" you may ask. I happen to know the answer to this question because I was in the EG meeting at JavaOne in which Kim-Man Chung gave a status update of the JSR 245 MR2 spec. He said that the version was bumped to align it with the JSP version, which will also be 2.1.2. Given that the Unified EL should be it's own spec, this makes absolutely no sense, but at least you know the reasoning behind it (and don't think you missed a haf-dozen versions in between). I'm also not happy at all about the closed-door decision, but I digress.

At some point, the Unified EL update will show up in GlassFish V3. As far as I can tell, it is not bundled today (but could be by the time you read this). How can you tell if it's there or not? The EL API can be found in the glassfish/modules/javax.servlet.jsp.jar file and the implementation is glassfish/modules/web/jsf-impl.jar. Extract the JARs and look at the META-INF/MANIFEST.MF or the pom.xml file to determine which version it is. You could also look for the presence of the javax.el.ValueReference, which is a new class in the API.

In case you were wondering, JBoss EL 2.0 is not (yet) and implementation of the Unified EL 2.1.2 API. Stay tuned.

So there you have it, information about the Unified EL update. I'm sorry this information is so hard to piece together. I think this would all be a lot simpler if EL was its own spec and/or there was decent information published about JSP. Oh, if the spec were actually open. The thing is, I don't give a care about JSP and frankly I want to divorce that spec in every way.

UPDATE: I put together a formal list of proposed enhancements requested by the Seam community on seamframework.org .

UPDATE: Ryan Lubke also blogged about the Unified EL update for Java EE 6. He included tips on how to update GlassFish with the latest EL build.

UPDATE: The EL spec document has been updated, making the changelog I cited above official. Grab the EL spec document from the "for evaluation" link on the JSR-245 maintenance release download page.

Posted at 01:46 AM in Java | Permalink Icon Permalink

5 Comments from the Peanut Gallery

1 | Posted by Andy Schwartz on August 03, 2009 at 10:02 AM EST

Thanks for shedding some light on this Dan. As you know, I was having a hard time myself piecing together the current status. More transparency (and possibly a separate JSR) would certainly be welcome.

Andy

2 | Posted by Lincoln Baxter on August 03, 2009 at 01:48 PM EST

Thanks for putting this info out, Dan -- We really need to have a better public center for JSF.

3 | Posted by Scott Langley on December 09, 2009 at 02:25 PM EST

Do you know if the syntax for the advanced features in JBoss EL and the new Sun EL 2.1.2 in J2EE 6 / Glassfish 3 are completely compatible? That is, is either jar a drop-in replacement for the other?

Thanks.

4 | Posted by Dan Allen on December 09, 2009 at 03:13 PM EST

The EL implementation in GlassFish is not a drop in replacement for JBoss EL. What they share is the parametrized EL syntax (they can be value expressions or method expressions). What you do not get is projections and magic methods (like .size on a collection).

Note that the version of EL you need to get parametrized EL syntax is 2.2. The artifacts are org.glassfish.web.el-api:2.2 and org.glassfish.web.el-impl:2.2.

5 | Posted by Scott Langley on December 10, 2009 at 08:34 PM EST

Thanks for the info, Dan.

I see that version 2.2 of el-impl.jar is the one distributed with Glassfish v3, released today.

But I'll try using JBoss EL, instead, for its extra features.