<c:forEach items="${list}" var="prod" varStatus="vs">
<tr <c:if test="${vs.index%2==1 }">style="background-color: #ffffff"</c:if>
<c:if test="${vs.index%2==0 }">style="background-color: #f9f9f9"</c:if>
>
<td title="${prod.prodId}">${prod.prodId}</td>
......
</tr>
</c:forEach>
list:后台传过来的集合
prod:你定义的名字
vs:用来计数
prodId:实体类中的属性名字