0

I am doing a simple JSP program to connect with MySQL DB. But it's showing the Exception like this. I am using Java version 1.6 and MySQL -connector 5.1.20. I have placed this connector (.jar) file in lib/ext directory of JAVA_HOME. I have set the CLASSPATH also to the value upto connector (.JAR) file. Still, I get the same Exception.

I have searched for this. I did all the things suggested by them. But I didn't found any results.

Please help me.

3
  • Are you using eclipse to execute this ? Commented Jun 18, 2012 at 9:37
  • I mean are you using any IDE like Eclipse or Netbeans for the project.If not use it.It will be easier to debug when there are any issues. Commented Jun 18, 2012 at 9:44
  • I am runnin in localhost like localhost:8080/jsp/Connect.jsp. I am not using any IDE. Commented Jun 18, 2012 at 9:48

2 Answers 2

3

Place the connector jar in the TOMCAT_HOME/lib folder of your tomcat installation. It should work.

Sign up to request clarification or add additional context in comments.

Comments

0

If you are using Netbeans, then right click on your project, select "Add library," then select MySQL JDBC driver and save it.

1 Comment

I am not using any IDE, I am using Tomcat to run it

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.