Hi,
Thanks for bringing up this point! I skimmed thru the JSTL spec just yesterday and missed it. But here it is today:
Syntax
Syntax 1: Set the value of a scoped variable using attribute value
<c:set value=�value�
var=�varName� [scope=�{page|request|session|application}�]/>
Syntax 2: Set the value of a scoped variable using body content
<c:set var=�varName� [scope=�{page|request|session|application}�]>
body content
</c:set>
Syntax 3: Set a property of a target object using attribute value
<c:set value=�value�
target=�target� property=�propertyName�/>
Syntax 4: Set a property of a target object using body content
<c:set target=�target� property=�propertyName�>
body content
</c:set>
.....
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.
This is from Null & Error handling under c:set. I also looked up PageContext.removeAttribute(name) from
J2EE 1.4 spec:
public abstract void removeAttribute(String name)
Remove the object reference associated with the given name from all scopes. Does nothing if there is no such object.
Parameters:
name - The name of the object to remove.
Throws:
NullPointerException - if the name is null
Remove, again from JSTL spec:
The <c:remove> action removes a scoped variable.
If attribute scope is not specified, the scoped variable is removed according to the semantics of PageContext.removeAttribute(varName). If attribute scope is specified, the scoped variable is removed according to the semantics of PageContext.removeAttribute(varName, scope).
Specs rule!
Cheers,
Anu
[ March 09, 2007: Message edited by: Anupama Ponnapalli ]