问题描述
<tablewidth="100%"class="statusDataTable"><c:forEachvar="i"begin="0"end="10"step="1"><c:choose><c:whentest="${i}%2==0">//<c:whentest="${i%2==0}">这样写也不行<trbgcolor="#FFFFFF"><td>${i}</td></tr></c:when><c:otherwise><trbgcolor="#E1DEDD"><td>${i}</td></tr></c:otherwise></c:choose></c:forEach></table>
AccordingtoTLDorattributedirectiveintagfile,attributetestdoesnotacceptanyexpressions
解决方案
解决方案二:
attributetestdoesnotacceptanyexpressionstest不接受任何表达式,这样翻译懂了吗
解决方案三:
是不是把EL禁用了。应该是web.xml文件版本太低。
解决方案四:
你两个写法,右边那个是对的。在我这里没问题。是不是你的JSTL版本低了?
解决方案五:
tomcat版本太低了
解决方案六:
${i}%2==0这不行应该${i}%2==0}
解决方案七:
第二个肯定是对的,应该是版本有问题,建议你下一个版本更新的jstl.jar
时间: 2024-08-07 03:44:08