Tomcat 6.0 设置 JNDI 数据源
可以在context.xml中添加:
<Contextpath="/connjndi" docBase="D:\workspace\TestJndi\WebRoot" reloadable="true">
<Resourcename="jdbc/SampleData" auth="Container" type="javax.sql.DataSource"
maxActive="100" maxIdle="30" maxWait="10000"
username="sampledata" password="password" driverClassName="oracle.jdbc.OracleDriver"
url="jdbc:oracle:thin:@//localhost:1521/mondrian"/>
</Context>
<description>Oracle Test App</description>
<resource-ref>
<description>DB Connection</description>
<res-ref-name>jdbc/SampleData</res-ref-name>
<res-type>javax.sql.DataSource</res-type>
<res-auth>Container</res-auth>
</resource-ref>写一个jsp文件进行测试