Last week, we had the author of TDD for a Shopping Website LiveProject. Friday at 11am Ranch time, Steven Solomon will be hosting a live TDD session just for us. See for the agenda and registration link
  • 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
  • Paul Clapham
  • Ron McLeod
  • Jeanne Boyarsky
  • Tim Cooke
Sheriffs:
  • Liutauras Vilda
  • paul wheaton
  • Henry Wong
Saloon Keepers:
  • Tim Moores
  • Tim Holloway
  • Stephan van Hulst
  • Carey Brown
  • Frits Walraven
Bartenders:
  • Piet Souris
  • Himai Minh

value of boolean set in bean in jstl

 
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I have a boolean that is being set in a bean, but jstl can't seem to test for it.
if i try this:
<c ut value="${currentService.recurring}"/>
it produces "true"
but when I try to test for it using:
<c:choose>
<c:when test="currentService.recurring eq 'true'">
<span>Recurring Service</span>
</c:when>
<c therwise>
<span>Non-recurring Service</span>
</c therwise>
</c:choose>
or this:
<c:choose>
<c:when test="currentService.recurring eq true">
<span>Recurring Service</span>
</c:when>
<c therwise>
<span>Non-recurring Service</span>
</c therwise>
</c:choose>
it always falls into the otherwise block.
Is there something i'm missing?
Thanks in advance for your help!!
 
B Hagan
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Or it might help if i escaped into the expression language....
forgot my ${}....
Doh!
 
what if we put solar panels on top of the semi truck trailer? That could power this tiny ad:
free, earth-friendly heat - a kickstarter for putting coin in your pocket while saving the earth
https://coderanch.com/t/751654/free-earth-friendly-heat-kickstarter
reply
    Bookmark Topic Watch Topic
  • New Topic