This week's book giveaways are in the Java EE and JavaScript forums.
We're giving away four copies each of The Java EE 7 Tutorial Volume 1 or Volume 2(winners choice) and jQuery UI in Action and have the authors on-line!
See this thread and this one for details.
The moose likes JSP and the fly likes JSTL and booleans Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of The Java EE 7 Tutorial Volume 1 or Volume 2 this week in the Java EE forum
or jQuery UI in Action in the JavaScript forum!
JavaRanch » Java Forums » Java » JSP
Bookmark "JSTL and booleans" Watch "JSTL and booleans" New topic
Author

JSTL and booleans

Andrew Mcmurray
Ranch Hand

Joined: Sep 24, 2005
Posts: 188
Hi all

Can JSTL evaluate booleans. For example could I use a c:if with bean.something where the getSomething method or the bean returned true or false?

Thanks,

AMD
Merrill Higginson
Ranch Hand

Joined: Feb 15, 2005
Posts: 4864
Yes, you can.


Merrill
Consultant, Sima Solutions
Andrew Mcmurray
Ranch Hand

Joined: Sep 24, 2005
Posts: 188
Thanks so I am guessing that the getter in the bean has to be getSomething and not isSomething right?

AMD
Merrill Higginson
Ranch Hand

Joined: Feb 15, 2005
Posts: 4864
Actually, isSomething is the standard naming convention, although I believe getSomething will work also.
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: JSTL and booleans