After googling a lot and seeing the answers here on SO of similar questions, I am still getting this error of ClassNotFoundException.
I tried the method here and here.
My apache tomcat webapps directory is C:\Program Files\Apache Software Foundation\Tomcat 6.0\webapps
. I also uploaded the mysql-connector-java-5.1.22-bin.jar
file in C:\Program Files\Java\jre7\lib
as mentioned in some of answers here in SO.
In my webapps/jsp folder I created an index.jsp file but it shows an error in the line Class.forName("com.mysql.jdbc.Driver").newInstance();
My current folder structure is:
C:\
-> Program Files
-> Apache Software Foundation
-> Tomcat 6.0
-> webapps
-> jsp
-> index.jsp
-> WEB-INF
-> lib
-> mysql-connector-java-5.1.22-bin.jar
Can anyone help me out?