As mentionned in the title, I don't understand why when the variable blabla does not exist I have:
${blabla.blabla}
which returns nothing
and
${!blabla.blabla}
which returns true
I guess that there is an implicit exception catch in the jstl evaluation but I can't understand the inner process and why it does work like this, especially when we have in the language : not empty
, and other checker components. What is the logic behind ?
JSP
EL
isNULL
friendly, if given attribute is not found or expression returnsnull
, it doesn’t throw any exception.For arithmetic operations, EL treats null as
0
and for logical operations, EL treatsnull
asfalse
.So when you are trying "!" for the variable which is not found it returns
true
Hope this helps!