为什么我现在已启动tomcat就报:严重Null component Catalina:type=DataSource,path=/test,host=localhost,class=javax.sql.DataSource,name="jdbc/test"
请兄弟们帮忙看看
我的web.xml的配置是:
<?xml version="1.0" encoding="UTF-8"?>
<web-app>
<resource-ref>
<res-ref-name>jdbc/test</res-ref-name>
<res-type>javax.sql.DataSource</res-type>
<res-auth>Container</res-auth>
<res-sharing-scope>Shareable</res-sharing-scope>
</resource-ref>
</web-app>虚拟路径的配置:
<Context displayName="test" path="/test" docBase="E:\project\test" workDir="work/Catalina/localhost/test">
<Resource
name="jdbc/test"
type="javax.sql.DataSource"
password="205518"
driverClassName="com.mysql.jdbc.Driver"
maxIdle="2"
maxWait="50"
username="root"
url="jdbc:mysql://localhost:3306/test"
maxActive="4"/>
</Context>
请兄弟们帮忙看看
我的web.xml的配置是:
<?xml version="1.0" encoding="UTF-8"?>
<web-app>
<resource-ref>
<res-ref-name>jdbc/test</res-ref-name>
<res-type>javax.sql.DataSource</res-type>
<res-auth>Container</res-auth>
<res-sharing-scope>Shareable</res-sharing-scope>
</resource-ref>
</web-app>虚拟路径的配置:
<Context displayName="test" path="/test" docBase="E:\project\test" workDir="work/Catalina/localhost/test">
<Resource
name="jdbc/test"
type="javax.sql.DataSource"
password="205518"
driverClassName="com.mysql.jdbc.Driver"
maxIdle="2"
maxWait="50"
username="root"
url="jdbc:mysql://localhost:3306/test"
maxActive="4"/>
</Context>
<res-ref-name>jdbc/test </res-ref-name>
<res-type>javax.sql.DataSource </res-type>
<res-auth>Container </res-auth>
<res-sharing-scope>Shareable </res-sharing-scope>
</resource-ref> 去掉试试
http://topic.csdn.net/u/20070620/11/1580c12e-0111-4a9b-a7c2-b40ed69ef0b0.html