我在context.xml里配了
 <Resource name="jdbc/cypx_bz" auth="Container" type="javax.sql.DataSource"
               maxActive="10" maxIdle="5" maxWait="-1"
               username="utan" password="utan" driverClassName="COM.ibm.db2.jdbc.app.DB2Driver"
               url="jdbc:db2://192.168.1.100:cypx_bz"/>
运行报错,找不到class"COM.ibm.db2.jdbc.app.DB2Driver",加驱动,我不知道到底加在哪个目录下了?
求救,急急急!!!

解决方案 »

  1.   

    1.修改/conf/ context.xml,<Context></Context>之间加入如下内容:
    <Resource name="jdbc/cypx_bz" auth="Container" type="javax.sql.DataSource"
      maxActive="10" maxIdle="5" maxWait="-1"
      username="utan" password="utan" driverClassName="COM.ibm.db2.jdbc.app.DB2Driver"
      url="jdbc:db2://192.168.1.100:cypx_bz"/>
    2.修改web.xml(注意这里我写的是mysql,你修改为db2即可)
    <description>MySQL Test App</description>
      <resource-ref>
          <description>DB Connection</description>
          <res-ref-name>jdbc/mldn</res-ref-name>
          <res-type>javax.sql.DataSource</res-type>
          <res-auth>Container</res-auth>
      </resource-ref>
      

  2.   

    我表示自带的tomcat 不一定能用
      

  3.   

    干嘛要用myeclipse的tomcat呢,,去下一个解压版的或者安装版的tomcat又不费多大事,,而且也不大。那样好搞多了。
      

  4.   

    我换tomcat6.0在context.xml里配:
    <Resource name="jdbc/cypx_bz" auth="Container" type="javax.sql.DataSource"
      maxActive="10" maxIdle="5" maxWait="-1"
      username="utan" password="utan" driverClassName="com.ibm.db2.jdbc.jcc.DB2Driver"
      url="jdbc:db2://192.168.1.100:50000/cypx_bz"/>
    就好了