The reason you got this error :
java.sql.SQLException: No suitable driver found for jdbc:mysql://localhost/dbname
When running TOMCAT in eclipse , it won't pick the libraries set in CATALINA_HOME/lib. For correcting this exception, we need to add the JDBC jar in Tomcat plugin config.
Double click on tomcat server present in Server tab of eclipse and then open 'Open launch Configuration' and then add jars in CLASSPATH tab. Here we are adding postgresql's jar.
Please see screenshots:
No comments:
Post a Comment