关于eclipse中出现Cannot create JDBC driver of class '' for connect URL 'null'

eclipse中出现这个问题

应该去新增的server下面的context.xml中配置
<WatchedResource>WEB-INF/web.xml</WatchedResource>

<Resource
        name="jdbc/donghuaDB"
        auth="Container"
        type="javax.sql.DataSource"
        maxActive="100"
        maxIdle="30"
        maxWait="10000"
        username="guolv"
        password="guolvpassword"
        driverClassName="oracle.jdbc.OracleDriver"
        url="jdbc:oracle:thin:@172.16.5.162:1521:phonedb"/>

注意观察下web.xml下面配置的连接

<resource-ref>
<res-ref-name>jdbc/donghuaDB</res-ref-name>
<res-type>javax.sql.DataSource</res-type>
<res-auth>Container</res-auth>
</resource-ref>

你可能感兴趣的:(java,Web,server,jdbc,context)