This week's book giveaway is in the Features new in Java 9 forum.
We're giving away four copies of Java 9 Revealed and have Kishori Sharan on-line!
See this thread for details.
Win a copy of Java 9 Revealed this week in the Features new in Java 9 forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

unclear statement from HF inJSTL  RSS feed

 
Juwonlo Ibigbami
Ranch Hand
Posts: 83
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello web component ranchers,
in HF, JSTL page 455. I dont understand what this is saying. can any one help me please.

"If the value evaluates to null, the variable will be
REMOVED! That�s right, removed."


Imagine that for the value (either in the body of the tag or using the value attribute),
you use ${person.dog}. If ${person.dog} evaluates to null (meaning
there is no person, or person�s dog property is null, then if there IS a variable
attribute with a name �Fido�, that attribute will be removed! (If you don�t specify
a scope, it will start looking at page, then request, etc.). This happens even if
the �Fido� attribute was originally set as a String, or a Duck, or a Broccoli
 
Sandeep Bhandari
Ranch Hand
Posts: 201
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
That means assigning null value to some object means that if it is already existing then it will be really null and thus will be sort of garbage collected and not available anymore with previous value.

If the variable/attribute doesn't exist already then in this case, it doesn't make any difference.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!