Please let me know why below code is ot worknig and how to solve it.
<c:choose>
<c:when test='${(status.index)%2 eq 0}'>
<c:set var="rowColor" value="even" scope="page"/>
</c:when>
</c:choose>
<tr class="${rowColor}">
I get "${rowcolor}" in html for above line of code -- <tr class="$
{rowColor}">
.
But <c:out value="${rowColor}"/> is worknig fine.
So my question is how to display rowcolor in for class with c:out?
> Please let me know why below code is ot worknig and how to solve it.
>
[quoted text clipped - 8 lines]
> I get "${rowcolor}" in html for above line of code -- <tr class="$
> {rowColor}">
I doubt it very much. I would believe you got "${rowColor}", though.
> But <c:out value="${rowColor}"/> is worknig fine.
>
> So my question is how to display rowcolor in for class with c:out?
How is var="rowColor" set when the c:when condition fails?
Your question would be easier for us to approach if you posted an SSCCE.
You might be working with a version of JEE that only accepts EL in JSTL
constructs. Since <tr> is not a JSTL tag, it wouldn't parse the EL expression
in that scenario.
Compare
<p>${rowColor}</p>
<p><c:out value="${rowColor}"/></p>
in a test page (which you could post as an SSCCE). What do you get?
What is your platform?

Signature
Lew