In my webapp, when I click on the login link, the Tomcat webserver throws the following exception:
exception
javax.servlet.ServletException: /aluno_jsf.xhtml
I would like to offer some reasons why you might get javax.el.ELException
on a EL Method reference in xhtml. Consider this a matter of reference, maybe others will continue to contribute.
xmlns
used in your
tag.Example, if you are using Java EE 6, then this is wrong:
And should be instead
Note the use of sun.com instead of jcp. You should use jcp for Java EE 7 upward.
Note that similar issues exist for
in persistence.xml, and
in beans.xml!
Research the documentation for the Tag Library, for the exact version you are using. You will have a few possibilities:
javax.el.MethodExpression
'. In that case it expects the supplied property to be of a different type and try to evaluate it as such. In case a Method is supplied it has to be with the ()
syntax, and the method will be executed only to retrieve the expected type.javax.el.ValueExpression
, in which case it does not even accept an Expression in EL syntax, and evaluation will happen immediately and only during rendering.For this particular question, we can refer to the PrimeFaces 3.4 Tag Documentation. It is unfortunate that the exact version used is not provided.
In this case, method references without ()
will by default interpreted as regular properties, and try to access getters/setters.