Dear forum members,

I hope to get advise as to what jstl sql:query var refers to. Netbeans' error message is on this particular line: <sql:query var="members" maxRows="5">.

Also, is there anything else wrong with the codes ?

Thank you very much.

<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt" %>
<%@ taglib prefix="sql" uri="http://java.sun.com/jsp/jstl/sql" prefix="sql"%>
<%@ taglib prefix="x" uri="http://java.sun.com/jsp/jstl/xml" %>
 
<%@page language="java" import ="java.sql.*" %>
 
<sql:setDataSource driver="com.mysql.jdbc.Driver" url="jdbc:mysql://
   localhost:3306/data1" user="root" password="abc"/>
 
<sql:query var="members" maxRows="5">
Select *, GROUP_CONCAT(subject.subjectName SEPARATOR \", \") AS Subj from members LEFT JOIN subinter ON subinter.membersID = members.id  LEFT JOIN subject ON subinter.subjectID = subject.id GROUP BY members.id");
 
</sql:query>
 
 
 
<h5>Members Record</h5>
<table border ="1" cellspacing="0" cellspacing="0" align="center" class="bordered">
    <tr><td><b>Member No</b></td>
    <td><b>Name</b></td>
    <td><b>NRIC</b></td>       
    <td><b>Email</b></td>
 
    </tr>    
   <c:forEach var="row" items="${members.rows}">
<tr>
<td><c:out value="${row.ID}" /></td>
<td><c:out value="${row.MemberName}" /></td>
<td><c:out value="${row.NRICNO}" /></td>
<td><c:out value="${row.Email}" /></td>
 
</tr>
</c:forEach>
</table>