我用的tomcat 是5.0.28版本的

解决方案 »

  1.   

    也有人说在web.xml中加入<resource-ref>
     <description>jdbc/mysql</description>
     <res-ref-name>jdbc/mysql</res-ref-name>
     <res-type>javax.sql.DataSource</res-type>
     <res-auth>Container</res-auth> 
    </resource-ref> 由于我用的是db2, 所以我把上面的mysql改成了db2, 结果还是一样的, exception!
      

  2.   

    比较在eclipse和直接TOMCAT主要配置文件异同,关键测重于数据库连接配置内容异同