- 爱易网页
-
Java教程
- Tomcat5.0.28 + JDK1.5 + Eclipse3.1数据库连接池有关问题
日期:2014-05-18 浏览次数:20742 次
Tomcat5.0.28 + JDK1.5 + Eclipse3.1数据库连接池问题
其实不想麻烦大家的,但是小弟在网上看了很多例子,还是没有搭建成功,请大家指点一下:
D:\Tomcat5.0\conf\Catalina\localhost 下:jado.xml
------------------------------------
<?xml version= '1.0 ' encoding= 'utf-8 '?>
<Context crossContext= "true " displayName= "jado " docBase= "D:\Workspace\jado\WebRoot\classes " path= "/jado " reloadable= "true " workDir= "work\Catalina\localhost\jado ">
<Resource auth= "Container " name= "jdbc/jado " type= "javax.sql.DataSource "/>
<ResourceParams name= "jdbc/jado ">
<parameter>
<name> factory </name>
<value> org.apache.commons.dbcp.BasicDataSourceFactory </value>
</parameter>
<parameter>
<name> url </name>
<value> jdbc:microsoft:sqlserver://127.0.0.1:1433;DatabaseName=testdb </value>
</parameter>
<parameter>
<name> password </name>
<value> sa </value>
</parameter>
<parameter>
<name> maxActive </name>
<value> 20 </value>
</parameter>
<parameter>
<name> maxWait </name>
<value> -1 </value>
</parameter>
<parameter>
<name> driverClassName </name>
<value> com.microsoft.jdbc.sqlserver.SQLServerDriver </value>
</parameter>
<parameter>
<name> username </name>
<value> sa </value>
</parameter>
<parameter>
<name> maxIdle </name>
<value> 10 </value>
</parameter>
</ResourceParams>
</Context>
---------------------------------
D:\Tomcat5.0\conf 下:server.xml
----------------------------
<?xml version= '1.0 ' encoding= 'utf-8 '?>
<Server>
<Listener className= "org.apache.catalina.mbeans.ServerLifecycleListener "/>
<Listener className= "org.apache.catalina.mbeans.GlobalResourcesLifecycleListener "/>
<GlobalNamingResources>