title: Unable to compile class for JSP
body: <p>I am working in a JSP project. While runnning the project using Netbeans with Tomcat 6 server, I got the following exception,</p>
  
  <pre><code>org.apache.jasper.JasperException: Unable to compile class for JSP: 
  
  An error occurred at line: 8 in the generated java file
  Only a type can be imported.  com.TransportPortal.MyFunctions resolves to a package
  
  Stacktrace:
      org.apache.jasper.compiler.DefaultErrorHandler.javacError(DefaultErrorHandler.java:92)
      org.apache.jasper.compiler.ErrorDispatcher.javacError(ErrorDispatcher.java:330)
      org.apache.jasper.compiler.JDTCompiler.generateClass(JDTCompiler.java:439)
      org.apache.jasper.compiler.Compiler.compile(Compiler.java:349)
      org.apache.jasper.compiler.Compiler.compile(Compiler.java:327)
      org.apache.jasper.compiler.Compiler.compile(Compiler.java:314)
      org.apache.jasper.JspCompilationContext.compile(JspCompilationContext.java:589)
      org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:317)
      org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:313)
      org.apache.jasper.servlet.JspServlet.service(JspServlet.java:260)
      javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
      org.netbeans.modules.web.monitor.server.MonitorFilter.doFilter(MonitorFilter.java:393)
  </code></pre>
  
  <p>It has <code>servelet-api.jar</code> in Apache Tomcat's <code>lib</code> directory.</p>
  
  <p>Please help me to resolve it.</p>