我在首先在C:\Program Files\Apache Software Foundation\Tomcat 6.0\conf目录下的context.xml中配置了如下
<resource name="jdbc/mysql"
auth="Container"
type="javax.sql.DataSource"
maxActive="100"
maxldle="30"
maxWait="10000"
username="root"
password="123"
driverClassName="com.mysql.jdbc.Driver"
url="jdbc:mysql://localhost:3306/fs?autoReconnect=true" />web.xml里面加入了如下:
<resource-ref>
<res-ref-name>jdbc/mysql</res-ref-name>
<res-type>javax.sql.DataSource</res-type>
<res-auth>Container</res-auth>
</resource-ref> 所以的JAR包都已经导入了...但是链接数据库是就总是报Cannot create JDBC driver of class '' for connect URL 'null'这个错..
在有的机子上运行我这些都可以,但是一换到我机子上就不行了。为什么撒??我的是Tomcat 6.0用的MyEclipse7.0
<resource name="jdbc/mysql"
auth="Container"
type="javax.sql.DataSource"
maxActive="100"
maxldle="30"
maxWait="10000"
username="root"
password="123"
driverClassName="com.mysql.jdbc.Driver"
url="jdbc:mysql://localhost:3306/fs?autoReconnect=true" />web.xml里面加入了如下:
<resource-ref>
<res-ref-name>jdbc/mysql</res-ref-name>
<res-type>javax.sql.DataSource</res-type>
<res-auth>Container</res-auth>
</resource-ref> 所以的JAR包都已经导入了...但是链接数据库是就总是报Cannot create JDBC driver of class '' for connect URL 'null'这个错..
在有的机子上运行我这些都可以,但是一换到我机子上就不行了。为什么撒??我的是Tomcat 6.0用的MyEclipse7.0
work\Catalina\localhost下面就是所有工程的目录