struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Zheng Wen Zhe <>
Subject what's wrong?? ---Connection with MySQL database
Date Tue, 14 Mar 2006 13:58:41 GMT

Why I got this error when initialize web server???? 


ERROR <14-Mar-2006 13:52:17> Initializing application data source userDB

org.apache.commons.dbcp.SQLNestedException: Cannot create JDBC driver of
class '' for connect URL 'jdbc:mysql://localhost:3306/struts'



Struts-config.xml file:

<data-source type="org.apache.commons.dbcp.BasicDataSource" key="userDB">

<set-property property="maxCount" value="4" />

<set-property property="minCount" value="2" />

<set-property property="description"

value="Artimus:MySQL Data Source Configuration" />

<set-property property="driverClass" value="com.mysql.jdbc.Driver" />

<set-property property="url" value="jdbc:mysql://localhost:3306/struts" />

<set-property property="autoCommit" value="true" />

<set-property property="user" value="root" />

<set-property property="password" value="password" />



Retrieve data in jsp file:

<sql:query var="rs" dataSource="userDB">

select id, foo, bar from testdata







  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message