title: Tomcat 5.5 Don't Find My Servlet
body: <p>I've compiled the source into the class <code>Files</code>, then putted at the folder:</p>
  
  <pre><code>Tomcat 5.5\WEB-INF\ROOT\classes\Files.class
  </code></pre>
  
  <p>And added this to the <code>web.xml</code> file:</p>
  
  <pre><code>&lt;servlet&gt;
      &lt;servlet-name&gt;Files&lt;/servlet-name&gt;
      &lt;servlet-class&gt;Files&lt;/servlet-class&gt;
  &lt;/servlet&gt;
  </code></pre>
  
  <p>But when I tried to access the URL <code>http://localhost:8080/Files</code>, I got this error from Tomcat:
  <a href="http://img251.imageshack.us/img251/5042/tomcat404.png" rel="nofollow noreferrer" title="Tomcat 404 Error">Tomcat 5.5 404 Error http://img251.imageshack.us/img251/5042/tomcat404.png</a></p>
  
  <hr>
  
  <p><strong>Update</strong>: after adding <code>&lt;servlet-mapping&gt;</code> I'm now getting the following error:</p>
  
  <pre><code>exception
  
  javax.servlet.ServletException: Error allocating a servlet instance
  org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:117)
  org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:174)
  org.apache.coyote.http11.Http11AprProcessor.process(Http11AprProcessor.java:837)
  org.apache.coyote.http11.Http11AprProtocol$Http11ConnectionHandler.process(Http11AprProtocol.java:640)
  org.apache.tomcat.util.net.AprEndpoint$Worker.run(AprEndpoint.java:1287)
  java.lang.Thread.run(Unknown Source)
  
  root cause
  
  java.lang.NoClassDefFoundError: IllegalName: /Files
  java.lang.ClassLoader.preDefineClass(Unknown Source)
  java.lang.ClassLoader.defineClassCond(Unknown Source)
  java.lang.ClassLoader.defineClass(Unknown Source)
  java.security.SecureClassLoader.defineClass(Unknown Source)
  org.apache.catalina.loader.WebappClassLoader.findClassInternal(WebappClassLoader.java:1960)
  org.apache.catalina.loader.WebappClassLoader.findClass(WebappClassLoader.java:931)
  org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1405)
  org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1284)
  org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:117)
  org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:174)
  org.apache.coyote.http11.Http11AprProcessor.process(Http11AprProcessor.java:837)
  org.apache.coyote.http11.Http11AprProtocol$Http11ConnectionHandler.process(Http11AprProtocol.java:640)
  org.apache.tomcat.util.net.AprEndpoint$Worker.run(AprEndpoint.java:1287)
  java.lang.Thread.run(Unknown Source)
  </code></pre>