• 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 Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

doubt in JSTL

 
Ranch Hand
Posts: 30
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
i should remove cart attribute from session scope which 2 are the possible ways?
<c:remove var="cart"/>
<c:remove var="cart" scope=="sessio"/>
<c:remove scope=="sessio">cart</c:remove>
<c:remove scope=="sessio">${cart}</c:remove>
 
Sheriff
Posts: 14691
16
Eclipse IDE VI Editor Ubuntu
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
If you look at the JSTL specification, 4.4 <c:remove>, can you figure out what the answer is ?
 
Ranch Hand
Posts: 5575
Eclipse IDE Windows XP Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Originally posted by Gorkal Raghavendra:

<c:remove scope=="sessio">cart</c:remove>
<c:remove scope=="sessio">${cart}</c:remove>



both are not possible .According TLD,the <c:remove/> must be an empty.it should not have body.


Note:
--------------------------------
<c:remove scope=="sessio">cart</c:remove>
--------------------------------
while posting the code please,double check the spelling mistakes

Hope This Helps
 
Gorkal Raghavendra
Ranch Hand
Posts: 30
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
ThanQ
 
Ranch Hand
Posts: 124
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
if the scope attribute is not present in the tag , it will remove the variable from all the scope.

so option 2 is the best to remove the variable from session scope. i think so.

am i right??
 
reply
    Bookmark Topic Watch Topic
  • New Topic