Skip to Main Content

Java EE (Java Enterprise Edition) General Discussion

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Interested in getting your voice heard by members of the Developer Marketing team at Oracle? Check out this post for AppDev or this post for AI focus group information.

conditional attribute - how to

843838Mar 28 2007 — edited Mar 28 2007
Hi,

I'm writing JSP document, so the jsp must be well formed.

I want to set the background of even and odd table rows by adding a class only on even rows (to avoid unnecessary source - network traffic).

Something like

if (even)
<tr class="even>
else
<tr>

How can this be done in JSP documents?
I've tried many approaches with JSTL,... but the "problem" is that condition can only be checked with <c:if> and <jsp:attribute> within <c:if> sets the attribute to <c:if>.

What am I missing?

Any ideas?

Comments

Locked Post
New comments cannot be posted to this locked post.

Post Details

Locked on Apr 25 2007
Added on Mar 28 2007
16 comments
511 views