关于EL表达式- isValid() == false 和- Undefined attribute name的报错

一. 问题描述

在用jsp页面时,jstl的jar全部导入进去了,request域中也有设置了变量A,但是在jsp页面中使用<c:forEach>用EL表达式获取那个变量A却提示Multiple annotations found at this line:- Undefined attribute name "item"的错误

二. 解决方法

经过排错后,发现是<c:forEach>中的items属性写成了item,正确的代码应该如下:

<c:forEach items="${page.data}" var="book">
发布了177 篇原创文章 · 获赞 16 · 访问量 1万+

猜你喜欢

转载自blog.csdn.net/qq_40634846/article/details/101945968
今日推荐