• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Does EL returns null value ... URGENT pls

 
Eshu San
Greenhorn
Posts: 18
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi

can anyone pls help me i have got my exam in another 2 hrs..

Does an EL expression possibly return a null value or does it give a blank page ie. in some places it's said that just the expression "${foo}" in a page would return a blank page and in some places the expression ${foo.bar} would return "null" if the property "bar" does not exist.i want to know the clarification before i head to the exam.So kindly help me..
[ December 02, 2004: Message edited by: Eshu San ]
 
Gabriel Forro
Ranch Hand
Posts: 59
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
it does give a blank page
 
Eshu San
Greenhorn
Posts: 18
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi

thanks for the reply but im still confused ..

So u mean to say that EL never returns the literal "null" as the return value of it's expression.what if the expression is assigned like this in a JSP page .. <c:set target=${foo.bar} property="test".../> does it not return null here too.
 
Gabriel Forro
Ranch Hand
Posts: 59
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello,

there it returns null (not the literal "null", but a real null). The result is the same as you would write:

<c:set target="<%= null %>" property="..." ../>
[ December 02, 2004: Message edited by: Gabriel Forro ]
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic