I am trying some simple code at first to learn a little of the new expression language. However I am already getting an error:
Here’s the test page, I found this on google, on some jsp tutorials. I changed the db connection to my db.
<%@ taglib prefix="c" uri="http://java.sun.com/jstl/core" %>
<%@ taglib prefix="sql" uri="http://java.sun.com/jstl/sql" %>
<sql:setDataSource var="dataSource" driver="com.mysql.jdbc.Driver"
url="jdbc:mysql://localhost:3306/petback2" user="root" password="sa"
/>
<html>
<body>
<sql:setDataSource
url="jdbc:mysql://localhost/petback2"
driver="com.mysql.jdbc.Driver"
user="root"
password="xxxxxxxx" />
<sql:query var="user"
sql="Select ownerid,oname,ostreet from powners">
</sql:query>
<table border=1>
<c:forEach var="row" items="${user.row}">
THIS ABOVE LINE HAS ERROR
<tr>
<td><c:out value="${row.ownerid}"/></td>
<td><c:out value="${row.oname}"/></td>
<td><c:out value="${row.ostreet}"/></td>
</tr>
</c:forEach>
</table>
</body>
</html>
The error says: According to TLD or attribute directive in tag file, attribute items does not accept any expressions
Can someone help?