0
votes

Is there a way to put the EL engine in to a "strict" mode?
I would like to get an error message when I reference something in EL that does not exist.

For example, I would like this to produce an error:

... value="#{cc.attr.attrname}" ...

It's misspelled. It should have been:

... value="#{cc.attrs.attrname}" ...

The default behavior appears to be:
ignore the fact that cc does not have an attr member, and assign an empty string to value.

If it matters, I'm using Mojarra 2.2.9 under Glass Fish 3.1.2.2 with

<class-loader delegate="false" />
<property name="useBundledJsf" value="true"/>
1

1 Answers

0
votes

EL is evaluated at runtime, so there is no way for compiler / IDE to know what some EL expression will resolve to. Your question does make sense in the context of custom components, but there is nothing stopping you from putting something like <c:set var="cc" value="some string"/> in the code, which would confuse the compiler / IDE.