Hi all,

I have connected the mysql database......but if i run my jsp code,
it is giving an error..........whats the main reason for this.

I have gone through some cases based on database connection, in that they said we have to copy mysqlconnector.jar file in lib folder of jdk.... but i dint find jar file in mysql.......please give the suggestion how to proceed with this problem.


Do no place anything in JDK installation, messing with installation is looking for troubles in the future. Connector/J Should be placed either in your project lib directory if you will use it only for one project or in Tomcat lib directory if you want more apps to use it.
You may want to post your code so we can see what is going on.


As you said, i got it but i am not able to find where is the jar file in mysql download...please tell me how to proceed with this error.


In order to establish communication between database and your web application you have to have running database, running web server/container, have connector/j library in desired lib folder of either web application or the web server. NOT IN BOTH, THIS MAY CAUSE ISSUES!

If these requirements are satisfied continue with bellow...

Is your web application successfully compiled?
If getting errors please post them

If successfully compiled what is the outcome of deployment?