1 Reply Latest reply: Dec 15, 2006 11:13 AM by 475314 RSS

    500 Internal Server Error

    544615
      This code doesn't and syntax error.. but on browser when it runs I receive an error message (500 Internal Server Error: javax.servlet.jsp.JspException: Unable to get connection, DataSource invalid: "null"):
      <%@ taglib uri="http://java.sun.com/jstl/core" prefix="c"%>
      <%@ taglib uri="http://java.sun.com/jstl/sql" prefix="sql"%>
      <%@ page contentType="text/html"%>
      <html>
      <body>
      <sql:setDataSource var="db" driver="oracle.jdbc.driver.OracleDriver"
      url="jdbc:oracle:thin:@localhost:1521:orcl"
      user="scott" password="tiger" />
      <sql:query var="employees">select * from emp</sql:query>
      <c:forEach var="columnName" items="${employees.columnNames}">
      <th><c:out value="${columnName}"/></th>
      </c:forEach>
      <c:forEach var="row" items="${employees.rows}">
      <tr><c:forEach var="column" items="${row}">
      <td><c:out value="${column.value}"/></td>
      </c:forEach></tr>
      </c:forEach>
      </body>
      </html>