title: Java Servlet & JDBC Driver Issue
body: <p>Having a problem loading my driver from a test servlet, the error simply being</p>
  <blockquote>
  <p>java.lang.ClassNotFoundException: com.mysql.jdbc.Driver</p>
  </blockquote>
  <p>Running the servlet via tomcat - which is running without issue as the localhost:8080 page is showing up in the browser. The servlet is attempting to connect to a database running in MySQL workbench.</p>
  <p>Code within my servlet class, which attempts to load the driver:</p>
  <pre><code>        String driver = &quot;com.mysql.jdbc.Driver&quot;;    
          Class.forName(driver).newInstance();
          // Make db connection
          con = DriverManager.getConnection(url, USERNAME, PASSWORD);   
          st  = con.createStatement();
  </code></pre>
  <p>System variables are setup as follows:</p>
  <blockquote>
  <p>JAVA_HOME: C:\Program Files\Java\jdk1.7.0_02\</p>
  <p>CLASSPATH:
  C:\apache-tomcat-6.0.35\lib\servlet-api.jar;C:\ProgramFiles\Java\jre7\lib\mysql-connector-java-5.1.22-bin;</p>
  <p>PATH: C:\Program Files\Java\jdk1.7.0_02\bin</p>
  </blockquote>
  <p>Now, as far as I can see, everything looks to be setup correctly. I would appreciate any input as to what may be causing the issue as I'm rather clueless as how else to troubleshoot this one.</p>
  <p>Many thanks.</p>