连接池
在Tomcat的配置文件apache-tomcat-7.0.40-windows-x64\apache-tomcat-7.0.40\confcontext.xml中
<Resource
name="jdbc/easybuy"
auth="Container"
type="javax.sql.DataSource"
factory="org.apache.tomcat.dbcp.dbcp.BasicDataSourceFactory"
maxActive="100"
maxIdle="30" maxWait="10000"
username="root"
password="sa"
driverClassName="oracle.jdbc.OracleDriver"
url="jdbc:oracle:thin:@localhost:1521:orcl
/>
在web.xml中
<resource-ref >
<description >databaseConnection</description >
<res-ref-name >链接池的name值</res-ref-name >
<res-type >javax.sql.DataSource</res-type >
<res-auth >Container</res-auth >
</resource-ref >