• Post Reply Bookmark Topic Watch Topic
  • New Topic

a question about c:if  RSS feed

 
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.
 
Don't get me started about those stupid light bulbs.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!