c:forEach items="lists" var="list" 传值 取不出来 求高手指点
publicStringgetAll(HttpServletRequestr){List<TestEntity>lists=testmapper.getAll();for...
public String getAll(HttpServletRequest r){
List<TestEntity> lists = testmapper.getAll();
for (int i = 0; i < lists.size(); i++) {
System.out.println(lists.get(i));
}
r.setAttribute("lists", lists);
return "admin/getAll";
}
____
<c:forEach items="lists" var="list" >
<tr>
<td><img src="${list.filepath}"></td>
<td>${list.picturename}</td>
</tr>
</c:forEach>
___
错误__
javax.el.PropertyNotFoundException: The class 'java.lang.String' does not have the property 'filepath'.
急急急 在线等 展开
List<TestEntity> lists = testmapper.getAll();
for (int i = 0; i < lists.size(); i++) {
System.out.println(lists.get(i));
}
r.setAttribute("lists", lists);
return "admin/getAll";
}
____
<c:forEach items="lists" var="list" >
<tr>
<td><img src="${list.filepath}"></td>
<td>${list.picturename}</td>
</tr>
</c:forEach>
___
错误__
javax.el.PropertyNotFoundException: The class 'java.lang.String' does not have the property 'filepath'.
急急急 在线等 展开
1个回答
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询