I’m trying to take a Java EE 6 application which runs fine on GlassFish 3.1.1 and deploy it on JBoss 7.0.2. I’m running into PropertyNotFound exceptions when I try to navigate to pages due to differences in JBoss EL. It seems that JBoss EL doesn’t allow method expressions to methods without parameters of the form:
<c:if test="${bean.calculateX('foo').size() > 0}">
In this example JBoss EL thinks the size method is a parameter. I can get it to work in JBoss by changing it to this:
<c:if test="${bean.calculateX('foo')[size] > 0}">
But now it won’t work in GlassFish. Is there a compatible way to accomplish this?
That seems to be an EL evaluation bug on the both servers. There are two very similar bug reports to this: JBoss AS7-2825 (fixed in 7.1.0) and Glassfish 17628 (fixed in 3.1.2). Those fixes might fix your issue as well. Otherwise it’s time to report a new one.
I’d however suggest using the EL
emptykeyword instead. There it is for.By the way, I wonder if the
[size]syntax is valid as per the EL spec to represent a non-getter method. This notation is usually used for dynamic properties.