Servlet Not Found Error : <p>Im getting a servlet not found error.  Im using WIldFly.  My directory structure looks like this:</p>

<p>root --> app, converter.html, src</p>

<p>app --> WEB-INF</p>

<p>WEB-INF--> classes, lib, web.xml</p>

<p>src --> servlet.java</p>

<p>I have been looking over it for awhile and can't pin point the problem.  I think I have the mapping down correctly in the web.xml and the form action seems to be sent to the right place as well in the .html file.</p>

<p>Servlet Class:</p>

<pre><code>import java.io.IOException;
import java.util.*;
import javax.servlet.ServletException;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

public class servlet extends HttpServlet{
    @Override
    protected void doGet(HttpServletRequest request, HttpServletResponse response) 
    throws ServletException, IOException{
    String username = request.getParameter("username");
    String email = request.getParameter("email");
    response.getWriter().println("&lt;html&gt;");
    response.getWriter().println("&lt;head&gt;");
    response.getWriter().println("&lt;title&gt;Title&lt;/title&gt;");
    response.getWriter().println("&lt;/head&gt;");
    response.getWriter().println("&lt;body&gt;");
    response.getWriter().println("Convert. ");
    response.getWriter().println("&lt;/body&gt;");
    response.getWriter().println("&lt;/html&gt;");
}


}
</code></pre>

<p>web.xml</p>

<pre><code>&lt;web-app xmlns="http://java.sun.com/xml/ns/j2ee"
  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd"
  version="2.4"&gt;

  &lt;servlet&gt;
    &lt;servlet-name&gt;servlet&lt;/servlet-name&gt;
    &lt;servlet-class&gt;servlet&lt;/servlet-class&gt;
  &lt;/servlet&gt;  

  &lt;servlet-mapping&gt;
    &lt;servlet-name&gt;servlet&lt;/servlet-name&gt;
    &lt;url-pattern&gt;/servlet&lt;/url-pattern&gt;
  &lt;/servlet-mapping&gt;

&lt;/web-app&gt;
</code></pre>

<p>converter.html</p>

<pre><code>&lt;!DOCTYPE html&gt;
&lt;html&gt;
&lt;head&gt;
        &lt;title&gt; Test form &lt;/title&gt;
&lt;/head&gt;
&lt;body&gt;
    &lt;form action="http://localhost:8080/root/src/servlet" method="get"&gt;
        Name: &lt;input type="text" name="username"&gt;&lt;br&gt;
        Email: &lt;input type="text" name="email"&gt;&lt;br&gt;
        &lt;input type="submit" value="Submit"&gt;
    &lt;/form&gt;
&lt;/body&gt;
&lt;/html&gt;
</code></pre>
