title: Error 500 - Wrapper cannot find servlet class Tomcat6
body: <p>I'm really going crazy in these days, I'm trying to develop a servlet, but I really can't understand why this one doesn't work.</p>
  
  <p>Here's the code:</p>
  
  <pre><code>import java.io.IOException;
  import javax.servlet.ServletException;
  
  import java.io.BufferedReader;
  import java.io.PrintWriter;
  
  import javax.servlet.ServletResponse;
  import javax.servlet.ServletRequest;
  import javax.servlet.GenericServlet;
  
  public class WipdServlet extends GenericServlet 
  {
      public void service(ServletRequest request, ServletResponse response)
      throws IOException {
          PrintWriter out = response.getWriter();
  
          out.println("&lt;html&gt;");
          out.println("&lt;body&gt;");
          out.println("&lt;h1&gt;ssup WIPD Servlet&lt;/h1&gt;");
          out.println("Content Type: " + request.getContentType());
          out.println("Content Length: " + request.getContentLength());
          out.println("&lt;/body&gt;");
          out.println("&lt;/html&gt;"); 
  
      }
  }
  </code></pre>
  
  <p>And web.xml:</p>
  
  <pre><code>&lt;web-app&gt;
      &lt;servlet&gt;
          &lt;servlet-name&gt;Wipd&lt;/servlet-name&gt;
          &lt;servlet-class&gt;WipdServlet&lt;/servlet-class&gt;
      &lt;/servlet&gt;
  
      &lt;servlet-mapping&gt;
          &lt;servlet-name&gt;Wipd&lt;/servlet-name&gt;
              &lt;url-pattern&gt;/wipd&lt;/url-pattern&gt;    
      &lt;/servlet-mapping&gt;
  &lt;/web-app&gt;
  </code></pre>
  
  <p>the servlet is under:</p>
  
  <pre><code>/var/lib/tomcat6/webapps/wipd/
  </code></pre>
  
  <p>For this work I need to run the servlet under Tomcat6 installed on a Debian running on a VM, I'm currently working on my Gentoo with servlet-api, after run javac on Gentoo I put file .class on Debian.
  But if i surf to:</p>
  
  <pre><code>http://192.168.0.177:8080/wipd/wipd.
  </code></pre>
  
  <p>I get:</p>
  
  <blockquote>
    <p>javax.servlet.ServletException: Wrapper cannot find servlet class
    WipdServlet or a class it depends on
      org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
      org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:293)
      org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:859)
      org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:602)
      org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:489)
      java.lang.Thread.run(Thread.java:636)</p>
  </blockquote>
  
  <p>I try even to put the class in a package, and edit web.xml specifying the package, but nothing.
  I'm really can't understand.</p>
  
  <p>Thanks in advance.</p>