Win a copy of The Little Book of Impediments (e-book only) this week in the Agile and Other Processes forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

doubt in JSTL

 
Gorkal Raghavendra
Ranch Hand
Posts: 30
  • Mark post as helpful
  • send pies
  • 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>
 
Christophe Verré
Sheriff
Posts: 14691
16
Eclipse IDE Ubuntu VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
If you look at the JSTL specification, 4.4 <c:remove>, can you figure out what the answer is ?
 
Seetharaman Venkatasamy
Ranch Hand
Posts: 5575
Eclipse IDE Java Windows XP
  • Mark post as helpful
  • send pies
  • 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
  • Quote
  • Report post to moderator
ThanQ
 
deepa raj
Ranch Hand
Posts: 124
  • Mark post as helpful
  • send pies
  • 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??
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic