This week's book giveaway is in the Big Data forum.
We're giving away four copies of Elasticsearch in Action and have Radu Gheorghe & Matthew Lee Hinman on-line!
See this thread for details.
The moose likes Web Component Certification (SCWCD/OCPJWCD) and the fly likes jstl set tag Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Elasticsearch in Action this week in the Big Data forum!
JavaRanch » Java Forums » Certification » Web Component Certification (SCWCD/OCPJWCD)
Bookmark "jstl set tag" Watch "jstl set tag" New topic

jstl set tag

sangeeta kapoor
Ranch Hand

Joined: Jun 15, 2004
Posts: 70
HF Page 447

Last Bullet point

" If the target expression is a bean, but the bean does not have property that matches property the contaier throws a exception. But be careful, because the EL expression by itself will not cause an exception if the property doesn't exist. So even though ${fooBean.notAProperty } won't cause an exception (it returns null) , if that same "notAProperty" is the value of a target attribute , container throws exception "

But a property cannot be the value for a target element. It must be a Bean or Map object. Is the above statemen correct?
Nitish Bahadur
Ranch Hand

Joined: Aug 25, 2003
Posts: 118
I think the author is trying to explain that if a property of a javabean does not exist then we will get an exception. However, if the javabean itself does not exist, then the EL is evaluated to null, as opposed to an exception.
It is sorta covered in the JavaRanch Style Guide.
subject: jstl set tag