Super new to JSP and just trying to access mysql
public static Connection connect(){
try{
Class.forName("con.mysql.jdbc.Driver").newInstance();
return DriverManager.getConnection("jdbc:mysql://localhost/db_name", "root", "******");
}catch(Exception e){
throw new Error(e);
}
I continue to get this error: ClassNotFoundException: con.mysql.jdbc.Driver
I understand that I need to change the "classpath" and/or that I need to move the mysql-connector jar file to tomcat7/lib but I have 2 problems:
- I have absolutely no idea what the classpath is and how to change it using ubuntu and dreamweaver.
- my tomcat7 folder doesn't have a lib directory. I don't know where to put the jar file.