• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

<c:set> tag

 
Abhishek khare
Greenhorn
Posts: 25
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The HFSJ book says that, in the set tag, if the value computes to null, the associated attribute is removed.

Just want to confirm my understanding, what I understand from this is that, if the value computes to null, the attribute would be removed from the mentioned scope, or would be removed from all the scope if the scope is not mentioned in the set tag.


 
Christophe Verré
Sheriff
Posts: 14691
16
Eclipse IDE Ubuntu VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Check the JSTL Specification:

If value is null
Syntax 1: the scoped variable defined by var and scope is removed.
If attribute scope is specified, the scoped variable is removed according to the semantics of PageContext.removeAttribute(varName, scope). Otherwise, the scoped variable is removed according to the semantics of PageContext.removeAttribute(varName).
Syntax 3:
if target is a Map, remove the entry with the key identified by property.
if target is a JavaBean component, set the property to null.
 
Abhishek khare
Greenhorn
Posts: 25
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks...
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic