1、将ojdbc14.jar放在Tomcat的lib目录中
2、在conf/context.xml文件中<Context>节点中添加
<Resource name="jdbc/books" auth="Container"
type="javax.sql.DataSource" maxActive="100" maxId="30"
maxWait="10000" username="system" password="orcl"
driverClassName="oracle.jdbc.driver.OracleDriver"
url="jdbc:oracle:thin:@localhost:1521:orcl" />
3、在web应用程序的web-inf/web.xml文件中<web-app>节点下添加
<resource-ref>
<description>books</description>
<res-ref-name>jdbc/books</res-ref-name>
<res-type>javax.sql.DataSource</res-type>
<res-auth>Container</res-auth>
</resource-ref>
4、使用JNDC连接对象
类&#x