Running JSP with Mysql Database.

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!!.

Advertisements

About Charles Ling
Web/Android/IPhone Developer. Very very interested in Web Architecture, Web Standard and and how to use Web to improve human social life and doing cool stuff.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: