Win a copy of Re-engineering Legacy Software this week in the Refactoring forum
or Docker in Action in the Cloud/Virtualization forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Remove and Set

 
satyam bobba
Greenhorn
Posts: 10
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
<c:set var="a" value="b" />

<c:set var="${a}" value="c" />

<c:remove var="${a}"/>

In HFSJ book mentioned the var attribute remove tag should not be expression.

But i am not getting any error?

I tried in manner also<c:remove var="<%=a%>"/>

Can i use expression for <c:set> and <c:remove> for var attribute?
 
Narendra Dhande
Ranch Hand
Posts: 951
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

Which JSTL version you are using ? According to the JSTL 1.1 the "var" attribute of "set" tag does not accept the expressions. It is compilation time error.

Thanks
 
satyam bobba
Greenhorn
Posts: 10
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I am using JSTL 1.0 . What is the Latest version
 
Narendra Dhande
Ranch Hand
Posts: 951
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

I think the stable release is JSTL 1.1, which is also in Exam. The JSTL 1.2 is under Maintainence realease.

Thanks
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic