title: Calling servlet results in HTTP Status 404 "The requested resource is not available"
body: <p>I have a servlet <code>register</code> in class <code>p1</code>. I have a JSP <code>jsp1.jsp</code>. I run JSP file and see it, but when I try to apply to the servlet, Tomcat shows an error:</p>
  <blockquote>
  <h3>HTTP Status 404</h3>
  <p>The requested resource (/omgtuk/Register) is not available.</p>
  </blockquote>
  <p>Servlet:</p>
  <pre><code>@WebServlet(&quot;/register&quot;)
  </code></pre>
  <p>web.xml:</p>
  <pre><code>&lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot;?&gt;
  &lt;web-app xmlns:xsi=&quot;http://www.w3.org/2001/XMLSchema-instance&quot; xmlns=&quot;http://java.sun.com/xml/ns/javaee&quot; xmlns:web=&quot;http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd&quot; xsi:schemaLocation=&quot;http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_3_0.xsd&quot; id=&quot;WebApp_ID&quot; version=&quot;3.0&quot;&gt;
    &lt;display-name&gt;omgtuk&lt;/display-name&gt;
    
    
   &lt;servlet&gt;
      &lt;description&gt;&lt;/description&gt;
      &lt;display-name&gt;register&lt;/display-name&gt;
      &lt;servlet-name&gt;register&lt;/servlet-name&gt;
      &lt;servlet-class&gt;p1.register&lt;/servlet-class&gt;
    &lt;/servlet&gt;
    &lt;servlet-mapping&gt;
      &lt;servlet-name&gt;register&lt;/servlet-name&gt;
      &lt;url-pattern&gt;/register&lt;/url-pattern&gt;
    &lt;/servlet-mapping&gt;
    
    &lt;welcome-file-list&gt;
      &lt;welcome-file&gt;jsp1.jsp&lt;/welcome-file&gt;
    &lt;/welcome-file-list&gt;
  &lt;/web-app&gt;
  </code></pre>
  <p>I'm using Eclipse.</p>