• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

<c:set> tag

 
Greenhorn
Posts: 25
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.


 
Sheriff
Posts: 14691
16
Eclipse IDE VI Editor Ubuntu
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thanks...
reply
    Bookmark Topic Watch Topic
  • New Topic