I have a serious question folks! I am trying to develop a JSP view and I am using 1) for and 2) if/else conditions, to change the colors of the buttons accordingly to green(if even i.e., if(i%2==0)) and red vice versa(if odd condn.,). But I am unable to achieve that for some reasons.If anybody could help me with that it would be of great help!
<ul class="navigation">
<% for(int i=0; i<31; i++) {%>
<c:if test="${i % 2 == 0}">
<li>
<a href="#" class="button green">
<div class="id">PatientID:</div>
<div class="name">Name:</div>
<div class="info-number">Bed No:</div>
</a>
</li>
</c:if>
<c:if test="${i % 2 != 0}">
<li>
<a href="#" class="button red">
<div class="id">PatientID:</div>
<div class="name">Name:</div>
<div class="info-number">Bed No:</div>
</a>
</li>
</c:if>
<% } %>
</ul>