Problems with JSP and MSSQL Server 2000
Hello,
I am working through the book and am currently on page 91 (data). I can't get the drivers to work with the syntax specified. Here is my code:
<%@ taglib prefix="c" uri="http://java.sun.com/jstl/core_rt" %>
<%@ taglib prefix="sql" uri="http://java.sun.com/jstl/sql_rt" %>
<sql:setDataSource var="datasource"
driver="com.microsoft.jdbc.sqlserver.SQLServerDriv er"
url="jdbc:microsoft:sqlserver://host:1433"
user="sa"
password="xxxxxx"
/>
<sql:query var="contacts" dataSource="${datasource}">
SELECT contactID, firstName, lastName FROM wk0..contacts
</sql:query>
I can't see anything wrong with this, but am always getting back:
org.apache.jasper.JasperException: Unable to get connection, DataSource invalid: "No suitable driver"
at org.apache.jasper.servlet.JspServletWrapper.servic e(JspServletWrapper.java:254)
at org.apache.jasper.servlet.JspServlet.serviceJspFil e(JspServlet.java:295)
at org.apache.jasper.servlet.JspServlet.service(JspSe rvlet.java:241)
at javax.servlet.http.HttpServlet.service(HttpServlet .java:853)
at org.apache.catalina.core.ApplicationFilterChain.in ternalDoFilter(ApplicationFilterChain.java:247)
:(
I've tried placing the MS drivers is lots of different locations, but to no avail. Has anyone got this working with MS SQL Server 2000? What could I possibly be doing wrong here?
Thanks
Khalid
|