title: servlet 404 found error when using html form
body: <p>I searched a lot but was not able to resolve it, need help.</p>
  
  <p>I am trying to request something to a servlet which is under</p>
  
  <blockquote>
    <p>project/src/com/servletfile.java</p>
  </blockquote>
  
  <p>from a jsp file which is under </p>
  
  <blockquote>
    <p>project/web-inf/jspfile.jsp</p>
  </blockquote>
  
  <pre><code>&lt;form action="servletfile.java" &gt;
        &lt;input type="submit" value="submit" name="submit" /&gt; &lt;br/&gt;&lt;br/&gt;
  &lt;/form&gt;
  </code></pre>
  
  <p>below is the web.xml </p>
  
  <pre><code>&lt;servlet&gt;
      &lt;servlet-name&gt;servletfile&lt;/servlet-name&gt;
      &lt;servlet-class&gt;com.servletfile&lt;/servlet-class&gt;
  &lt;/servlet&gt;
  &lt;servlet-mapping&gt;
      &lt;servlet-name&gt;servletfile&lt;/servlet-name&gt;
      &lt;url-pattern&gt;/servletfile&lt;/url-pattern&gt;
  &lt;/servlet-mapping&gt;
  </code></pre>
  
  <p>however when i click on submit it says file not found. </p>