File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes JSP and the fly likes value of boolean set in bean in jstl Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » JSP
Bookmark "value of boolean set in bean in jstl" Watch "value of boolean set in bean in jstl" New topic
Author

value of boolean set in bean in jstl

B Hagan
Greenhorn

Joined: Mar 21, 2004
Posts: 2
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

Joined: Mar 21, 2004
Posts: 2
Or it might help if i escaped into the expression language....
forgot my ${}....
Doh!
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: value of boolean set in bean in jstl