Running JSP with Mysql Database.
21 May, 2008 Leave a comment
When you had the chance developing Jsp pages with Mysql as a database and Apache Tomcat 5.** as the back end server, and trying to run the simple database test connection and encounter the following error messages :
java.lang.ClassNotFoundException:com.mysql.jdbc.Driver
1st. If you are using IDE like eclipse or Netbeans, make sure you had include the java mysql connector jar file by the Eclipse right click on project look for Build Path and add the mysql .jar file into the library. Try and restart the apache tomcat server.
2nd. If it doesn’t work, copy the previous download mysql jdbc driver into directory one located at your apache tomcat common\lib folder; as C:\apache-tomcat-5.5.26\common\lib.
If this doesn’t work copy the file to C:\apache-tomcat-5.5.26\bin (i had no idea, basically i just copy and paste everything).
Restart the apache tomcat server and now it should be able to run!!.