我是用jbuilder自带的tomcat配置的连接池,所有的文件都配置过,可是运行后会出现这个问题
 Unable to get connection, DataSource invalid: "java.sql.SQLException: No suitable driver"--------怎么解决,大家来看看,解决不了毕业设计就完不成了。
我的server.xml的配置
<Resource
name="jdbc/TestPool"
type="javax.sql.DataSource"
username="sa"
password="123456"
driverClassName="com.microsoft.jdbc.sqlserver.SQLServerDriver"
url="jdbc:microsoft:sqlserver://localhost:1433;DatabaseName=Test"
maxIdle="10"
maxActive="20"
maxWait="-1"/>
context.xml的配置
<ResourceLink
name="jdbc/TestPool"
type="javax.sql.DataSource"
global="jdbc/TestPool"/>
web.xml的配置
<resource-ref>
    <res-ref-name>jdbc/TestPool</res-ref-name>
    <res-type>javax.sql.DataSource</res-type>
    <res-auth>Container</res-auth>
    <res-sharing-scope>Shareable</res-sharing-scope>
  </resource-ref>
我的代码是
<sql:setDataSource var="example1" dataSource="jdbc/TestPool"/>
<sql:query var="query1" dataSource="${example1}">select * from test</sql:query>
<table>
  <c:forEach var="rows" items="${query1.rows}">
    <tr>
      <td>
       ID: <c:out value="${rows.ID}"/></td>
        <td>Pname:<c:out value="${rows.Pname}"/></td>
    </tr>
  </c:forEach>
</table>