Cool JSTL Trick
I didn't know this, but JSTL's Expression Language is smarter than I thought. It is actually able to interpret the following expression:
<c:when test="{bodyId == ('login' or 'about')}">
As you can plainly see, this is much easier than the long way I was writing my expressions:
<c:when test="{bodyId == 'login' or bodyId == 'about'}">
Cool! (I removed the $
before bodyId
to make Velocity happy.)
Update: False alarm - this doesn't work like I'd hoped. The long way seems to be the only real way to make this logic work.
Posted by Lance on April 08, 2003 at 01:01 PM MDT #