第一次配置TOMCAT的连接池,快绝望了,救命啊~
Cannot create JDBC driver of class ' ' for connect URL 'null '
.jar已经放到\Tomcat\common\lib下和web目录的WEB-INF\lib
------解决方案--------------------http://shanmin2005.bokee.com/viewdiary.14505702.html
------解决方案--------------------sunwei_07 ()一个问题你要问80遍 别人一说就明白您老呀 还是转行吧
在%TOMCAT_HOME%/conf/Catalina/localhost下新建一个与你web文件夹同名的xml文件
<?xml version= "1.0 " encoding= "UTF-8 "?>
<Context>
<Resource
name= "jdbc/****** "
type= "javax.sql.DataSource "
password= "123456 "
driverClassName= "com.microsoft.jdbc.sqlserver.SQLServerDriver "
maxIdle= "2 "
maxWait= "5000 "
username= "sa "
url= "jdbc:microsoft:sqlserver://localhost;DatabaseName=quickstart "
maxActive= "4 "/>
</Context> 根据个人具体情况进行相应修改。
TOMCAT把work\Catalina下localhost删掉 然后在重起TOMCAT
------解决方案--------------------看看这个 http://www.haolla.com/girls/index.asp
http://haolla.com/wy
------解决方案--------------------把你LIB包里面JTDS包DEL掉
还不行到MSN告诉我 我就不信教不会你了
------解决方案--------------------Tomcat 5.0.28配置如下:
================================
<Context crossContext= "true " displayName= "Test " docBase= "Test " path= "/Test " workDir= "work\Catalina\localhost\Test ">
<Resource auth= "Container " name= "jdbc/Data " type= "javax.sql.DataSource "/>
<ResourceParams name= "jdbc/Data ">
<parameter>
<name> factory </name>
<value> org.apache.commons.dbcp.BasicDataSourceFactory </value>
</parameter>
<parameter>
<name> url </name>
<value> jdbc:mysql://192.168.1.100/test?useUnicode=true </value>
</parameter>
<parameter>
<name> username </name>
<value> root </value>
</parameter>
<parameter>
<name> password </name>
<value>
</value>
</parameter>
<parameter>
<name> maxWait </name>
<value> 1 </value>
</parameter>
<parameter>
<name> maxActive </name>
<value> 5 </value>
</parameter>
<parameter>
<name> driverClassName </name>
<value> org.gjt.mm.mysql.Driver </value>
</parameter>
<parameter>
<name> maxIdle </name>
<value> 1 </value>
</parameter>
</ResourceParams>
</Context>
访问如下:
-------------------------------
<%@page contentType= "text/html;charset=gb2312 " import= "javax.sql.*,javax.naming.*,java.sql.*,dev.sql.DataSource "%>
<%
Connection con=null;
DataSource t=null;
try{
t=new DataSource();
con=t.getCon();
}catch(Exception e){
out.println(e);