| Author |
EL access operator
|
amarkirt saroay
Ranch Hand
Joined: Mar 16, 2008
Posts: 167
|
|
Is this true:
If the dot operator is used to access the bean property but the property does not exist ,then a runtime exception is thrown !
|
SCJP-75%
SCWCD-82%
|
 |
Siphiwe Madi
Ranch Hand
Joined: Aug 16, 2007
Posts: 70
|
|
Hi,
The is only one way to find out. "Try it".
Regards,
Siphiwe Madi
[SCJP, __, __]
Next ... scwcd, scjwsd
|
Regards, Siphiwe Madi
[SCJP, SCWCD, __] Next ... scjwsd
|
 |
Ravi Bansal
Ranch Hand
Joined: Aug 18, 2008
Posts: 82
|
|
|
it will return null and EL simply ignores null values........
|
SCJP 5.0 94%
OCE-EJBD 90%
|
 |
Katrin Perry
Ranch Hand
Joined: Mar 07, 2007
Posts: 46
|
|
Hi,
If the bean doesn't exist (not found in any of the scopes) -> null, which is ignored and no Exception would be thrown.
If on the other hand the bean exists (it is found in one of the scopes), but you try to reference a property that doesn't exist an Exception would be thrown.
I hope that this helps.
Thanks
Katrin
|
Katrin
SCJP 5.0, SCWCD, SCBCD
|
 |
Bear Bibeault
Author and ninkuma
Marshal
Joined: Jan 10, 2002
Posts: 56151
|
|
Ravi Bansal wrote:it will return null and EL simply ignores null values........
Incorrect.
|
[Smart Questions] [JSP FAQ] [Books by Bear] [Bear's FrontMan] [About Bear]
|
 |
 |
|
|
subject: EL access operator
|
|
|