Topic: strtus中如何连接mysql数据库 |
Print this page |
1.strtus中如何连接mysql数据库 | Copy to clipboard |
Posted by: yuanyuan621 Posted on: 2005-12-01 11:17 <data-sources> <data-source key="org.apache.struts.action.DATA_SOURCE" type="org.apache.commons.dbcp.BasicDataSource"> <set-property property="driverClassName" value="org.gjt.mm.mysql.Driver" /> <set-property property="url" value="jdbc:mysql://localhost/member" /> <set-property property="username" value="root" /> <set-property property="password" value="" /> <set-property property="maxActive" value="10" /> <set-property property="maxIdle" value="3" /> <set-property property="maxWait" value="60000" /> <set-property property="defaultAutoCommit" value="true" /> <set-property property="defaultReadOnly" value="false" /> </data-source> </data-sources> 不知道这样错在哪,可是总是连接不上数据库,是不是mysqldriver.jar包不对啊 |
2.Re:strtus中如何连接mysql数据库 [Re: yuanyuan621] | Copy to clipboard |
Posted by: chinamicrofox Posted on: 2006-01-05 03:18 一个是要打开数据库,另外有几个jar文件要包含在的lib部署文件夹里,建议你用tomcat5.0.30,然后看看5.5.X和它有区别的。这个问题我化了30多小时搞定了,你加油!!!主意tomcat启动时的控制台信息,这是解决问题的关键 |
Powered by Jute Powerful Forum® Version Jute 1.5.6 Ent Copyright © 2002-2021 Cjsdn Team. All Righits Reserved. 闽ICP备05005120号-1 客服电话 18559299278 客服信箱 714923@qq.com 客服QQ 714923 |