1: I have downloaded the mysql-connector-java-5.1.24-bin.jar
Okay.
2: I have created a lib folder in my project and put the jar in there.
Wrong. You need to drop JAR in /WEB-INF/lib
folder. You don't need to create any additional folders.
3: properties of project->build path->add JAR and selected the JAR above.
Unnecessary. Undo it all to avoid possible conflicts.
4: I still get java.sql.SQLException: No suitable driver found for jdbc:mysql//localhost:3306/mysql
This exception can have 2 causes:
- JDBC driver is not in runtime classpath. This is to be solved by doing 2) the right way.
JDBC URL is not recognized by any of the loaded JDBC drivers. Indeed, the JDBC URL is wrong, there should as per the MySQL JDBC driver documentation be another colon between the scheme and the host.
jdbc:mysql://localhost:3306/mysql