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

a question about c:if

 
Henry Zheng
Ranch Hand
Posts: 60
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
It is mentioned in the jstl 1.1 specification that <c:if> can be an empty tag that carries no body content.
But I wonder why do we need an empty <c:if>? Just in order to store a boolean result in a scoped variable?

thanks
 
Vijay S. Rathore
Ranch Hand
Posts: 449
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
That's the place where scope comes into picture. If your declare an c:if without a body you have to give at least 'var' and 'scope. And then you can use this 'var' anywhere in the defined scope.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic