• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Exception in EL when bean property doesn't exist

 
Nimit Shah
Ranch Hand
Posts: 55
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
On page 447 of HFSJ it says that EL Expression by it self will not cause execption if property doesn't exists. So, ${fooBean.notAProperty} won't cause exception it just returns null.

When I try the same using Tomcat it throws following error on EL ${dog.asdf} (there is an object in request scope with name dog)

javax.servlet.ServletException: Unable to find a value for "asdf" in object of class "domainobjects.Dog" using operator "."

I might have misunderstood this. If someone can clear this it would be of great help.
 
Bear Bibeault
Author and ninkuma
Marshal
Pie
Posts: 65335
97
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
What does the specification have to say about it?
 
Surajsingh Thakur
Ranch Hand
Posts: 124
Eclipse IDE MySQL Database Tomcat Server
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
please check the specifications properly....

 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic