No suitable driver found for jdbc/mySQL appears when attempting to make a connection to a mySQL database in Java.
First and foremost, you will need to ensure that your application server has been configured properly to use the database driver JAR to handle JDBC connections. When configuring the application server, it is important to ensure that the JNDI name is properly formatted. In this case, the proper JNDI name for mySQL is jdbc/mySQL (this is case sensitive).
You will also need to ensure that the JNDI name is properly formatted in your Java application. In this case, the proper JNDI name for mySQL is jdbc/mySQL.
<sql:query var="myvar" dataSource="jdbc/mySQL"> select * from foo; </sql:query>
If you are connecting to a database in a JSP page via a DataSource, ensure you've the following imports in your JSP page.
<%@ page import="java.io.*,java.util.*,java.sql.*"%> <%@ page import="javax.servlet.http.*,javax.servlet.*" %>