• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

bean property access in EL

 
Harshana Dias
Ranch Hand
Posts: 348
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hey,

How come in EL if we access a bean property which is not available it giving a runtime exception. EL suppose to handle null know which nothing should print?

eg: ${x.y} //x is bean and y is not available property

Thank You.

(HFSJ page 437 Q17 said so give runtime exception thrown)
 
Bear Bibeault
Author and ninkuma
Marshal
Pie
Posts: 65342
97
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Nulls are handled just fine. If the property returns a null, the evaluation will be the empty string. A missing property is not the same as null.

Have you checked the Specification to see what it has to say?
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic