Hi Everybody,
I have one doubt that you people can clarify.
It is written that EL is null - friendly, page displays even if it can't find an attribute/property/key with the name in the expression.
Following can be scenarios.....>
1. Suppose if foo attribute is not present in any of the scope
${foo} will displays nothing and no exception will come
${9+foo} will be 9 as in Arithmetic exp. null is 0
${true && foo} will be false as in Logical exp. null or any other value other than true will be false.
2. Suppose we have bar but bar has no property.
here bar attribute is a bean and do not have any property like age
${bar} will displays called toString of bar bean.
BUT
${bar.age} will throw exception where it is mentioned in book that it
${bar[foo]} will display nothing but exception...
Please clarify this doubt that if property does not exist, should there be nothing on page or exception...
What i have tested, i think, property must be there and if property is null, then nothing is displayed...
Have a nice day.........
Pawan
SCJP 5.0
Target: SCWCD 1.4