折騰了幾個小時。。
終于連通了,現在終結一下。。我用的tomcat50.28。連接mysql數據庫!
1,先在tomcat的admin下配置數據源!
2,在web.xml下加上<resource-ref>
<description>Northwind Connection</description>
<res-ref-name>jdbc/Northwind</res-ref-name>
<res-type>javax.sql.DataSource</res-type>
<res-auth>Container</res-auth>
</resource-ref>
3,在conf目錄的Catalina下的localhost下的文件的xml配置加上<ResourceLink name="jdbc/root" global="jdbc/root" type="javax.sql.DataSourcer"/>
其中jdbc/root為數據源名字
原文轉自:http://www.anti-gravitydesign.com