Java Forum

Ask Question   UnAnswered
Home » Forum » Java       RSS Feeds

EL Complex Conditions

  Asked By: Bryant    Date: Apr 22    Category: Java    Views: 944

I am using the Apache JSTL library on my JSP pages. On one of them I
am using the "when" tag with a complex condition. The JSP specs don't
address complex conditions very well, so here I am. My JSTL tags:

<c:when test="${reportNum != 'rpt513'} && ${reportNum !=
<h1>This is some other report.</h1>
<h1>This is either report 513 or 515.</h1>

The problem is that the complex condition in the "when" tag doesn't
work (the JSP always goes to the "otherwise" tag). Does anybody know
how to code this complex condition?



1 Answer Found

Answer #1    Answered By: Troy Kelley     Answered On: Apr 22

I think by chaning like this you can solve it:
<c:when test="${reportNum} != 'rpt513' && ${reportNum} !=

Didn't find what you were looking for? Find more on EL Complex Conditions Or get search suggestion and latest updates.