As per my understanding if we use var without scope than container searches in all four scopes and if it cant find in any of four scope container makes new on in page scope.
So I stored attribute in session scope and in c:set action I put var="nameofattributeinsessionscope" value="newvalue"
but session attribute is not modified instead new attribute of same name created at page scope.
So is it that first para is wrong and if scope not specified it defaults to page and only that will be serached if not found create attribute in page scope without searching through request, session, application.
I still confused, if the scope attribute is not specified, will it search in page scope, then continued request scope, session scope and application scope? Is this mechanism also applicable for c:remove?
Hendy Setyo Mulyo
SCJP 1.4 (95%), SCWCD 1.4 (94%)
Joined: May 14, 2007
Simply, <c:set> sets the variable at the specified scope. :-)
Joined: Jun 13, 2005
If you read HFSJ page 447 Q2 it says if you don't specify scope attribute in tag than container will search scopes in order in which you expect page, request, session, application. If container can not find in any of four scope new attribute created in page scope.