Results 1 to 2 of 2
  1. #1
    sonali is offline Member
    Join Date
    Mar 2011
    Rep Power

    Question access mysql databse in jsp file+eclipse

    Hi all,

    i want to access mysql database server from jsp program using eclipse editor.

    for this i downloaded

    mysql-connector-java-3.1.14 folder contains mysql-connector-java-3.1.14-bin.jar

    then i add this jar file in to eclipse referanced lib(by using build path->java build path->add external)

    after that,i started tomcat server and executed the jsp program

    but i am gettting the following error
    java.lang.ClassNotFoundException: com.mysql.jdbc.Driver

    when i create simple java file src folder which contain db connection and run this as java application it works fine but when i used jsp file it gives me error.

    if any one know how to access mysql database server using
    mysql-connector-java-3.1.14 driver with eclipse,please explain me....

  2. #2
    travishein's Avatar
    travishein is offline Senior Member
    Join Date
    Sep 2009
    Rep Power


    i think there is something about needing to have the mysql jar file added to the list of jar files that gets copied into the tomcat's runtime library path.
    even though you are using eclipse, the tomcat instance that eclipse manages is still a tomcat instance, there will be a lib folder that we need to tell eclipse to populate with the framework kinds of jar files like this mysql jdbc driver

Similar Threads

  1. eclipse with mysql
    By amitabh in forum Eclipse
    Replies: 2
    Last Post: 07-22-2010, 05:46 AM
  2. Connector J with Eclipse and MySQL 5.0.x
    By int80 in forum Eclipse
    Replies: 11
    Last Post: 05-31-2010, 09:32 AM
  3. Replies: 10
    Last Post: 10-29-2009, 08:03 PM
  4. How to access MySQL Database in Eclipse 3.2
    By nijava in forum Eclipse
    Replies: 2
    Last Post: 12-12-2008, 03:04 PM
  5. Eclipse / Mysql problem
    By jdevm in forum Eclipse
    Replies: 0
    Last Post: 10-09-2008, 01:16 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts