ITPUB??ì3
ITPUB论坛 » Java入门与认证版 » tomcat5.5 变为tomcat6.0报错问题!

新一届的微软MVP评选已经开始,欢迎各位推荐!

标题: tomcat5.5 变为tomcat6.0报错问题!
离线 crazylch01
一般会员



精华贴数 0
个人空间 0
技术积分 308 (6403)
社区积分 0 (760418)
注册日期 2006-2-13
论坛徽章:0
      
      

发表于 2008-6-16 16:23 
tomcat5.5 变为tomcat6.0报错问题!

我在TOMCAT5.5下程序运行正常,在TOMCAT6.0下提示我连接不上数据库了.请问那位朋友知道为什么啊!
启动时提示:Null component Catalina:type=DataSource,path=/credit,host=localhost,class=javax.sql.DataSource,name="jdbc/xypj"
查询错误提示:Name java:comp is not bound in this Context

server.xml

<Context docBase="D:/creditquery/WebContent" path="/credit" reloadable="true">
        <Resource
      auth="Container"
      name="jdbc/xypj"
       type= "javax.sql.DataSource"
      driverClassName="oracle.jdbc.driver.OracleDriver"
      url="jdbcracle:thin:@192.168.5.5:1521:yg"
      username="xypj"
      password="xypj"
     maxActive= "10"   maxIdle= "100"
   maxWait= "3000"/>  
</Context>

看网上说在WEB.XML写
<web-app>
<resource-ref>
                <description>DB Connection</description>
                <res-ref-name>jdbc/xypj</res-ref-name>
                <res-type>javax.sql.DataSource</res-type>
                <res-auth>Container</res-auth>
        </resource-ref>
我写了也没好使.请问是为什么啊.


只看该作者    顶部
离线 javalod
天下江湖


精华贴数 0
个人空间 0
技术积分 587 (3270)
社区积分 6 (14906)
注册日期 2008-6-4
论坛徽章:5
行业板块每日发贴之星开发板块每日发贴之星开发板块每日发贴之星开发板块每日发贴之星开发板块每日发贴之星 
      

发表于 2008-6-17 17:52 
参考tomcat文档

*** 作者被禁止或删除 内容自动屏蔽 ***
 
    

相关内容


CopyRight 1999-2006 itpub.net All Right Reserved.
北京皓辰广域网络信息技术有限公司. 版权所有
E-mail:Webmaster@itpub.net
京ICP证:010037号 联系我们 法律顾问