title: Only a type can be imported. ABC resolves to a package
body: <p>(I've read other questions on this topic, but none of them have helped)</p>
  
  <p>Okay, I'm trying to import a Java class into my JSP file, but Tomcat gives me the error:</p>
  
  <blockquote>
    <p>org.apache.jasper.JasperException: Unable to compile class for JSP: </p>
  
  <pre><code>An error occurred at line: [16] in the generated java file: [I:\path\to\index_jsp.java]
  Only a type can be imported. org.runas.XKCDUtils resolves to a package
  
  An error occurred at line: 7 in the jsp file: /index.jsp
  XKCDUtils cannot be resolved
  </code></pre>
  </blockquote>
  
  <pre><code>4:  String data = null;
  5:  int finalComic = 1;
  6:  int comicNo = 1;
  7:  finalComic = XKCDUtils.getFinalComic();
  8: 
  9:  if (request.getParameter("page") != null)
  10:         comicNo = Integer.parseInt(request.getParameter("page"));
  </code></pre>
  
  <p>The import statement in my JSP file is:</p>
  
  <pre><code>&lt;%@page import="java.io.*, java.net.*, org.runas.XKCDUtils" %&gt;
  </code></pre>
  
  <p>The relevant section of my directory structure is:</p>
  
  <pre><code>webapps
  `-ROOT
   `-index.jsp
   |-WEB-INF
    `-web.xml
    |-classes
     `-org
      `-runas
       `-XKCDUtils.class
  </code></pre>
  
  <p>I'm confused because <code>org.runas.XKCDUtils resolves to a package</code>, and yet it is clearly a class file, in what I believe is the correct directory.</p>
  
  <p>Help, please!</p>
  
  <p>(And don't chastise me for using scriptlets, I'm trying to clean them up!)</p>