This week's book giveaway is in the OCMJEA forum.
We're giving away four copies of OCM Java EE 6 Enterprise Architect Exam Guide and have Paul Allen & Joseph Bambara on-line!
See this thread for details.
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 OCM Java EE 6 Enterprise Architect Exam Guide this week in the OCMJEA 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
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: c:remove