JSP "items" does not support runtime expressions

<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<c:forEach var="datatables" items="${ds}">
			<tr>
				<td>${datatables.engine}</td>
				<td>${datatables.browser}</td>
				<td>${datatables.platform}</td>
				<td>${datatables.version}</td>
				<td>${datatables.grade}</td>
			</tr>
</c:forEach>

In my JSP page, I import JSTL taglib like above, but it gives me the error that "items" does not support runtime expressions. The reason is previous taglib directive imports a JSTL 1.0 taglib. It should be JSTL 1.1 instead (note the difference in URI):

Solution: Change to the taglib

<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>  

Make sure you've imported jstl.jar in your project.


你可能感兴趣的:(jsp,jsp,jsp,jstl,jstl)