jstl已经导入到工程里,部署后,jsp出现: /jstl.jsp attribute items does not accept any expressions
什么原因,类也引入到jsp里了,body代码:<%Listlist=newArrayList();list.add(newPerson("aaa"));list.add(...
什么原因,类也引入到jsp里了,body代码 :
<% List list=new ArrayList();
list.add(new Person("aaa"));
list.add(new Person("bbb"));
list.add(new Person("ccc"));
request.setAttribute("list", list);
%>
<c:forEach var="person" items="${list }">
${person.name }
</c:forEach>
org.apache.jasper.JasperException: /jstl.jsp (line: 21, column: 8) According to TLD or attribute directive in tag file, attribute items does not accept any expressions 展开
<% List list=new ArrayList();
list.add(new Person("aaa"));
list.add(new Person("bbb"));
list.add(new Person("ccc"));
request.setAttribute("list", list);
%>
<c:forEach var="person" items="${list }">
${person.name }
</c:forEach>
org.apache.jasper.JasperException: /jstl.jsp (line: 21, column: 8) According to TLD or attribute directive in tag file, attribute items does not accept any expressions 展开
2个回答
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询