Unable to get connection, DataSource invalid: prob
My code is as follows
<%@ taglib uri="http://java.sun.com/jstl/core_rt" prefix="c" %>
<%@ taglib uri="http://java.sun.com/jstl/sql_rt" prefix="sql" %>
<sql:setDataSource var="datasource"
url="jdbc:mysql://localhost:8080/publish"
driver="org.gjt.mm.mysql.Driver"
user="root" password="admin" />
<sql:query var="publish">
select id,title,price from book
</sql:query>
<html>
<head>
<body>
<table>
<tr>
<td>id</td>
<td>title</td>
<td>price</td>
<c:forEach items="${publish.row}" var="row">
<tr>
<td>
<c:out value="${row.id}" /></td>
<td>
<c:out value="${row.title}" /></td>
<td>
<c:out value="${row.price}" /></td>
</tr>
</c:forEach>
</table>
</body>
</head>
</html>
and the error that i am getting
org.apache.jasper.JasperException: Unable to get connection, DataSource invalid: "null"
I am working on Suse 9.0...
i have included mysql-connector-java-2.0.14-bin.jar in tomca/common/lib still the error doesn't go.
protozoa
|