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