折騰了幾個(gè)小時(shí)。。
終于連通了,現(xiàn)在終結(jié)一下。。我用的tomcat50.28。連接mysql數(shù)據(jù)庫!
1,先在tomcat的admin下配置數(shù)據(jù)源!
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為數(shù)據(jù)源名字
新聞熱點(diǎn)
疑難解答
圖片精選