折騰了幾個小時。。
終于連通了,現在終結一下。。我用的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為數據源名字
新聞熱點
疑難解答