title: Can't import simple class/package into a simple JSP page using Apache Tomcat
body: <p>Can someone please walk me through the process of loading a class or package in JSP with Tomcat?</p>
  
  <p>I think it might just be a Tomcat setup issue :S my JSP file runs fine without importing or using dbpool or dbpooljar. I've tried many suggestions to other peoples similar issues without any luck. Any help would be apreciated!</p>
  
  <p>My class/package placed in web-inf/classes (among other places)</p>
  
  <pre><code>package dbpooljar;
  public class DBPool
  {   
     public DBPool()
     {
       System.out.println("dbpool evidence!");
     }
   }
  </code></pre>
  
  <p>My compile commands</p>
  
  <pre><code>javac "C:\website\apache-tomcat-6.0.18\webapps\ROOT\WEB-INF\classes\dbpool.java"
  jar cf "C:\website\apache-tomcat-6.0.18\webapps\ROOT\WEB-INF\classes\dbpooljar.jar" DBPool.java
  </code></pre>
  
  <p>My <em>index.jsp</em></p>
  
  <pre><code>&lt;%@ page import="java.sql.*,java.util.List,java.util.ArrayList,DBPool" %&gt;
  
  &lt;html&gt;
    &lt;body&gt;
      Getting Length of a String
      &lt;%
          String s1 = "Length of a String!";
          out.println("\"" + s1 + "\"" + " is  of   "  +  s1.length() +   " characters ");
          DBPool test=new DBPool();
      %&gt;
    &lt;/body&gt;
  &lt;/html&gt;
  </code></pre>
  
  <p>And lastly my horrible error (among others when I've tried different things)</p>
  
  <pre><code>An error occurred at line: 9 in the generated java file
  The import DBPool cannot be resolved
  </code></pre>