JNDI-Tomcat 5.5.17, Cannot create JDBC driver of class '' for connect URL '

I wrote a jsp program using JNDI to get connected to MySql DB, but i got the error " Cannot load JDBC driver class 'com.mysql.jdbc.Driver' " while running the program.

I'm using NetBean5.5 which has bundled TomCat5.5.17.

I've refered to many tutorials and websites, but i still can't solve it, here's my configuration and codes:

Imported mysql-connector-java-5.0.5-bin into lib directory.

context.xml:

<Context path="/WebApplication1">

<Resource name="jdbc/jsp" auth="Container" type="javax.sql.DataSource"/>

<ResourceParams name="jdbc/jsp">

<parameter>

<name>driverClassName</name>

<value>com.mysql.jdbc.Driver</value>

</parameter>

<parameter>

<name>url</name>

<value>jdbc:mysql://localhost:3306/jsp</value>

</parameter>

<parameter>

<name>username</name>

<value>root</value>

</parameter>

<parameter>

<name>password</name>

<value>malaysia</value>

</parameter>

<parameter>

<name>maxActive</name>

<value>20</value>

</parameter>

<parameter>

<name>maxIdle</name>

<value>10</value>

</parameter>

<parameter>

<name>maxWait</name>

<value>-1</value>

</parameter>

</ResourceParams>

</Context>

i included the following in Web.xml:

<resource-ref>

<res-ref-name>jdbc/jsp</res-ref-name>

<res-type>javax.sql.DataSource</res-type>

<res-auth>Container</res-auth>

<res-sharing-scope>Shareable</res-sharing-scope>

</resource-ref>

My JSP Code:

Context initContext = new InitialContext();

Context envContext = (Context)initContext.lookup("java:/comp/env");

DataSource ds = (DataSource)envContext.lookup("jdbc/jsp");

Connection conn = ds.getConnection();

Thanks~~~~

[2199 byte] By [mjj2332a] at [2007-11-26 22:38:39]
# 1
I think mysql jdbc library should add to the class library path of your project.Hope this helps.
Sean.Hoa at 2007-7-10 11:50:49 > top of Java-index,Core,Core APIs...