Hi all,
I saved my connector/j jar file into this location C:\ ... \Java\jre6\lib\ext as well as in $CATALINA_HOME/common/lib and i am using this code in the JSP :


I am getting below driver error message. Somebody please help me out.

javax.servlet.ServletException: java.lang.ClassNotFoundException: com.mysql.jdbc.Driver

My jar file name is mysql-connector-java-5.1.13-bin.jar.

have you added the jar to the classpath ?

Classic example of clashing multiple drivers locations.

Never mess around with Java installation directory!

Meaning delete that driver out of C:\ ... \Java\jre6\lib\ext and keep it either in server common library, Tomcat 5 and lower versions TOMCAT_DIRECTORY/common/lib, Tomcat 6 TOMCAT_DIRECTORY/lib or have it in project library folder TOMCAT_DIRECTORY/webapps/YOUR_PROJECT/WEB-INF/lib.