【发布时间】:2010-10-12 15:23:06
【问题描述】:
我有这个代码:
<c:forEach var="product" items="${products}" begin="${begin}" end="${end}" varStatus="loopStatus" step="1">
<div class="home_app "${loopStatus.index % 2 == 0 ? '' : 'white_bg'}">
当我浏览到 jsp 时,我在 div 中得到了这个:
<div }="" white_bg="" :="" ?="" 0="" 2="=" %="" ${loopstatus.index="" class="home_app ">
【问题讨论】:
-
什么servlet容器? web.xml 中的 servlet 版本是什么?如果你用
c:out代替呢? -
不幸的是,经过一番搜索,这是 Tomcat 4.1,我找到了 ?这个旧版本不支持运算符。
标签: jsp el conditional-operator