• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

jstl set tag

 
sangeeta kapoor
Ranch Hand
Posts: 70
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 118
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic