*
The moose likes Web Component Certification (SCWCD/OCPJWCD) and the fly likes c:remove Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Certification » Web Component Certification (SCWCD/OCPJWCD)
Bookmark "c:remove" Watch "c:remove" New topic
Author

c:remove

Vineela Devi
Ranch Hand

Joined: Dec 20, 2003
Posts: 191
Hi,

If we dont specify any scope for <c:remove> will it search for the attribute in all the four scopes and then remove the one tht it encounters first or will it remove the attribute from all the scopes?(If the attribute with the same name exists in more than one scope).

Thanks in Advance
Vineela
Vishnu Prakash
Ranch Hand

Joined: Nov 15, 2004
Posts: 1026
From JSTL 1.1 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).


From JSP 2.0 API


removeAttribute

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.

removeAttribute

public abstract void removeAttribute(String name, int scope)

Remove the object reference associated with the specified name in the given scope. Does nothing if there is no such object.


Servlet Spec 2.4/ Jsp Spec 2.0/ JSTL Spec 1.1 - JSTL Tag Documentation
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: c:remove
 
Similar Threads
IMP c:remove doubt
Default scope fpr <c:set ?
page 448 jstl doubt
JSTL: remove object from scope
How does c:remove scope=... work?