title: Unable to compile class for JSP, import cannot be resolved
body: <p>I'll post my first question on this forum so be kindly =)</p>
  
  <p>My problem is that my import on my jsp file cannot be resolved : </p>
  
  <pre><code>&lt;%@ page import="java.util.List" %&gt;
  &lt;%@ page import="com.javapapers.java.social.facebook.FBConnection" %&gt;
  &lt;%@ page language="java" contentType="text/html; charset=ISO-8859-1"
    pageEncoding="ISO-8859-1"%&gt;
  &lt;%
  FBConnection fbConnection = new FBConnection();
  %&gt;
  &lt;!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"  "http://www.w3.org/TR/html4/loose.dtd"&gt;
  &lt;html&gt;
  &lt;head&gt;
  &lt;meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"&gt;
  &lt;title&gt;Java Facebook Login&lt;/title&gt;
  &lt;/head&gt;
  &lt;body style="text-align: center; margin: 0 auto;"&gt;
  &lt;div
      style="margin: 0 auto; background-image: url(./img/fbloginbckgrnd.jpg); height: 360px; width: 610px;"&gt;
      &lt;a href="&lt;%=fbConnection.getFBAuthUrl()%&gt;"&gt;&lt;img
          style="margin-top: 138px;" src="./img/facebookloginbutton.png" /&gt;
      &lt;/a&gt;
  &lt;/div&gt;
  &lt;/body&gt;
  &lt;/html&gt;
  </code></pre>
  
  <p>I crawled this forum since a day and I've done all what is said and I didn't found the solution for my problem...</p>
  
  <p>here is the error :</p>
  
  <pre><code>org.apache.jasper.JasperException: Unable to compile class for JSP: 
  
  An error occurred at line: [15] in the generated java file: [C:\Users\Matthieu\workspace\.metadata\.plugins\org.eclipse.wst.server.core\tmp0\work\Catalina\localhost\Facebook_Login\org\apache\jsp\index_jsp.java]
  The import com.javapapers.java.social.facebook.FBConnection cannot be resolved
  
  An error occurred at line: 6 in the jsp file: /index.jsp
  FBConnection cannot be resolved to a type
  3: &lt;%@ page language="java" contentType="text/html; charset=ISO-8859-1"
  4:  pageEncoding="ISO-8859-1"%&gt;
  5: &lt;%
  6:  FBConnection fbConnection = new FBConnection();
  7: %&gt;
  8: &lt;!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"&gt;
  9: &lt;html&gt;
  
  
  An error occurred at line: 6 in the jsp file: /index.jsp
  FBConnection cannot be resolved to a type
  3: &lt;%@ page language="java" contentType="text/html; charset=ISO-8859-1"
  4:  pageEncoding="ISO-8859-1"%&gt;
  5: &lt;%
  6:  FBConnection fbConnection = new FBConnection();
  7: %&gt;
  8: &lt;!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"         "http://www.w3.org/TR/html4/loose.dtd"&gt;
  9: &lt;html&gt;
  
  
  Stacktrace:
      org.apache.jasper.compiler.DefaultErrorHandler.javacError(DefaultErrorHandler.java:102)
               org.apache.jasper.compiler.ErrorDispatcher.javacError(ErrorDispatcher.java:198)
  org.apache.jasper.compiler.JDTCompiler.generateClass(JDTCompiler.java:450)
  org.apache.jasper.compiler.Compiler.compile(Compiler.java:361)
  org.apache.jasper.compiler.Compiler.compile(Compiler.java:336)
  org.apache.jasper.compiler.Compiler.compile(Compiler.java:323)
  org.apache.jasper.JspCompilationContext.compile(JspCompilationContext.java:585)
  org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:363)
  org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:396)
  org.apache.jasper.servlet.JspServlet.service(JspServlet.java:340)
  javax.servlet.http.HttpServlet.service(HttpServlet.java:729)
  org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52)
  </code></pre>
  
  <p>I've put my classes on WEB-INF/classes as recommended (respecting the package name : com/javapapers/java/social/facebook)</p>
  
  <p>I'm working on Eclipse Luna with a TomCat 8.0 server</p>
  
  <p>Deployement assembly : 
  <a href="http://www.hostingpics.net/viewer.php?id=630313DeployelentAssembly.png" rel="nofollow">Deployement Assembly</a></p>
  
  <p>Librairies : 
  <a href="http://www.hostingpics.net/viewer.php?id=184915librairies.png" rel="nofollow">Librairies</a></p>
  
  <p>Sources : 
  Test/src</p>
  
  <p>But the error's still there</p>
  
  <p>Can you help me please</p>
  
  <p>Thanks</p>