日期:2014-05-20  浏览次数:20643 次

请前辈指教,配置TOMCAT数据库连接池的错误问题
在server.xml加了下面的代码后TOMCAT就起不来了
<Resource
  name= "jdbc/red "
  type= "javax.sql.DataSource "
  password= "sunwei "
  driverClassName= "com.microsoft.jdbc.sqlserver.SQLServerDriver "
  maxIdle= "2 "
  maxWait= "5000 "
  username= "sunwei "
  url= "jdbc:microsoft:sqlserver://localhost;DatabaseName=shop "   maxActive= "10 "/>

TOMCAT一闪就没了

------解决方案--------------------
再你WEB。XML中加入
<resource-ref>
<description> ******* </description>
<res-ref-name> jdbc/**** </res-ref-name>
<res-type> javax.sql.DataSource </res-type>
<res-auth> Container </res-auth>
</resource-ref>
------解决方案--------------------
http://blog.csdn.net/qianlei0007/archive/2007/02/19/1511927.aspx
------解决方案--------------------
你这个就是传说中的 杀猫 了 把server.xml你加的代码 去掉 然后 在启动一下 你的 tomcat
把你的工程发布到 tomcat 服务器里面 然后关闭 tomcat 在把 这些代码加上去 在启动tomcat就应该 OK了
------解决方案--------------------
<Resource name= "db/kafu/lm " auth= "Container "
type= "javax.sql.DataSource " username= "sa " password= " "
driverClassName= "com.microsoft.jdbc.sqlserver.SQLServerDriver " url= "jdbc:microsoft:sqlserver://127.0.0.1;DatabaseName=lm "
maxActive= "8 " maxIdle= "4 "/>

上面是我以前用的一个,是写在context.xml里的,你参考下吧。