I use Netbeans 8.0.2 on Windows. I wrote an example JSP page
<%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@taglib prefix="sql" uri="http://java.sun.com/jsp/jstl/sql"%>
<%@page contentType="text/html" pageEncoding="UTF-8"%>
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>JSP Page</title>
</head>
<body>
<h2>Hello, World!</h2>
<sql:query var="allRows" dataSource="jdbc/sample">
SELECT name, city, state FROM APP.customer
</sql:query>
<table border="1">
<thead>
<tr>
<th>Name</th>
<th>Location</th>
</tr>
</thead>
<tbody>
<c:forEach var="currentRow" items="${allRows.rows}">
<tr>
<td>"${currentRow.name}"</td>
<td>"${currentRow.city}", "${currentRow.state}"</td>
</tr>
</c:forEach>
</tbody>
</table>
</body>
</html>
but if I execute this page, I get
javax.servlet.ServletException:
SELECT name, city, state FROM APP.customer
: Table/view 'APP.CUSTOMER' is not exist.
sample database is a demo Derby database. I use GlassFish Server 4.1, JDK 7, Java EE 7. All these are in the default installation of Netbeans. I use default settings of GlassFish Server.
I see sample database connection at Services tab. It is jdbc:derby://localhost:1527/sample. I see this url in SamplePool connection pool properties of GlassFish. This connection pool is used in jdbc/sample JDBC resource. APP.CUSTOMER table is exist in sample database.
What do I do wrong?