the page 448 describes how to use c:remove tag, it states that the scope if not mentioned in the <c:remove var="blah"/> resolves to page scope. [...] <c:remove var="user"/>// the c:remove tag removes the user variable created under session scope even without me mentioning the scope...
You're right - the book is wrong.
The JSTL specs say: "If attribute scope is not specified, the scoped variable is removed according to the semantics of PageContext.removeAttribute(varName)."
And the API docs for JspContext.removeAttribut(String) say: "Remove the object reference associated with the given name from all scopes."
did you then mean that <c:remove var="user"/> will not remove the session scoped variable "user". Will this remove a request scope variable "user" if it did exist in the request scope? Could you please explain? Thanks.
Joined: Oct 05, 2004
The c:remove var="user"/> recursively removes all the varaibles of the name "user" in all scopes