20030407 Monday April 07, 2003

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 in Java at Apr 07 2003, 11:51:08 PM MDT 1 Comment

Comments:

You should be able to make Velocity happy by escaping the $ with a backslash \$

Posted by Lance on April 08, 2003 at 07:01 AM MDT #

Post a Comment:
  • HTML Syntax: Allowed