eric- the name of your DB in the URL appears incorrect instead of url="jdbc:mysql://localhost:3306/p6120?autoReconnect=true"
use url="jdbc:mysql://localhost:3306/P6120?autoReconnect=true" anyone else? M- This e-mail communication and any attachments may contain confidential and privileged information for the use of the designated recipients named above. If you are not the intended recipient, you are hereby notified that you have received this communication in error and that any review, disclosure, dissemination, distribution or copying of it or its contents ----- Original Message ----- From: "Eric Yin" <[EMAIL PROTECTED]> To: <users@tomcat.apache.org> Sent: Friday, November 03, 2006 4:12 PM Subject: Re: Cannot create JDBC driver of class '' for connect URL 'null'" > Quoting Eric Yin <[EMAIL PROTECTED]>: > >> Hi, >> >> I'm using tomcat5.5.2 and mysql5.0.27 and Connector/J 5.0. >> i'm doing the same thing as >> http://tomcat.apache.org/tomcat-5.5-doc/jndi-datasource-examples-howto.html >> and i got this error. >> >> i'm using fedora 5 and i download "Linux (non RPM package) downloads >> /linux (x86)" of mysql and install it accoding to the insturction. I >> created a databse P6120 and table test2 by using user 'eric' and >> passwod 'ericyin1'. >> >> I add the following to server.xml: >> <Context path="/DBTest" docBase="DBTest" >> debug="5" reloadable="true" crossContext="true"> >> <Resource name="jdbc/TestDB" auth="Container" type="javax.sql.DataSource" >> maxActive="100" maxIdle="30" maxWait="10000" >> username="eric" password="ericyin1" >> driverClassName="com.mysql.jdbc.Driver" >> url="jdbc:mysql://localhost:3306/p6120?autoReconnect=true"/> >> >> </Context> >> >> I add the following to web.xml: >> <resource-ref> >> <description>DB Connection</description> >> <res-ref-name>jdbc/TestDB</res-ref-name> >> <res-type>javax.sql.DataSource</res-type> >> <res-auth>Container</res-auth> >> </resource-ref> >> >> I add the following to the index.jsp: >> <%@ taglib uri="http://java.sun.com/jsp/jstl/sql" prefix="sql" %> >> <%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %> >> <sql:query var="rs" dataSource="jdbc/TestDB"> >> select id, name, studentid from test2 >> </sql:query> >> >> >> <c:forEach var="row" items="${rs.rows}"> >> name ${row.name}<br/> >> studentid ${row.studentid}<br/> >> </c:forEach> >> >> thanks, >> >> Eric. >> >> >> >> --------------------------------------------------------------------- >> To start a new topic, e-mail: users@tomcat.apache.org >> To unsubscribe, e-mail: [EMAIL PROTECTED] >> For additional commands, e-mail: [EMAIL PROTECTED] >> > > > > > --------------------------------------------------------------------- > To start a new topic, e-mail: users@tomcat.apache.org > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > >