Win a copy of Learning OpenStack Networking: Build a solid foundation in virtual networking technologies for OpenStack-based clouds this week in the Cloud/Virtualization forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Liutauras Vilda
  • Campbell Ritchie
  • Tim Cooke
  • Bear Bibeault
  • Devaka Cooray
Sheriffs:
  • Jeanne Boyarsky
  • Knute Snortum
  • Junilu Lacar
Saloon Keepers:
  • Tim Moores
  • Ganesh Patekar
  • Stephan van Hulst
  • Pete Letkeman
  • Carey Brown
Bartenders:
  • Tim Holloway
  • Ron McLeod
  • Vijitha Kumara

c:remove custom tag  RSS feed

 
Ranch Hand
Posts: 46
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
<c:remove var="s">cool</c:remove>

s is a session scoped attribute..
will this tag remove the session scoped attribute s?
 
Sheriff
Posts: 14691
16
Eclipse IDE Ubuntu VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
"remove" is not supposed to have a body.

Let's asuume that you remove the body. If you don't specify the scope in the "remove" tag, the process will be the same as calling PageContext.removeAttribute.
So check the API for removeAttribute, and you'll get your answer
 
Ranch Hand
Posts: 59
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I agree with Satou kurinosuke.

c:remove will remove attrbutes in any scope.
It will only call : JspContext.removeAttribute(String attribute);
 
Ranch Hand
Posts: 40
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
So suppose if the attribute "s" exists in multiple scopes, only the first one encountered would be removed, or all of them would be removed?
 
Ranch Hand
Posts: 344
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
in this case with scope page will be removed..
the order is page > request > session > application
 
Ranch Hand
Posts: 128
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

So suppose if the attribute "s" exists in multiple scopes, only the first one encountered would be removed, or all of them would be removed?



All of them will be removed.
Accrding to API doc:

Remove the object reference associated with the given name from all scopes.

 
Greenhorn
Posts: 15
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Please refer this Topic Confusion about "scope" attribute -- JSTL Thread

Thanks,
Seenikkannan.K

[ March 20, 2007: Message edited by: Seenikkannan krishnasamy ]

[ March 20, 2007: Message edited by: Seenikkannan krishnasamy ]
[ March 20, 2007: Message edited by: Seenikkannan krishnasamy ]
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!