title: HTTP Status 404 - Servlet .... is not available
body: <p>I use eclise to create a servlet like this :</p>
  
  <pre><code>package hello;
  public class NewServlet extends HttpServlet {
  private static final long serialVersionUID = 1L;
  
  protected void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
      System.out.println("doPost");
  
      String name = request.getParameter("textField");
  
      response.setContentType("text/html");
      PrintWriter pw = response.getWriter();
      pw.print("&lt;html&gt;&lt;head&gt;&lt;/head&gt;&lt;body&gt;&lt;center&gt;");
      pw.print("Hello " + name + "!");
      pw.print("&lt;/center&gt;&lt;/body&gt;&lt;/html&gt;");
   }
  }
  </code></pre>
  
  <p>and a html file like :</p>
  
  <pre><code>&lt;!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"&gt;
  &lt;html&gt;
  &lt;head&gt;
  &lt;meta http-equiv="Content-Type" content="text/html; charset=utf-8"&gt;
  &lt;title&gt;Insert title here&lt;/title&gt;
  &lt;/head&gt;
  &lt;body&gt;
  &lt;form method="post" action="NewServlet"&gt;
      &lt;p align="center"&gt;
          &lt;font&gt;Input some text&lt;/font&gt; &lt;br&gt; &lt;input type="text"
              name="textFiled"&gt; &lt;br&gt; &lt;input type="submit"
              value="submit"&gt; &lt;br&gt;
      &lt;/p&gt;
  &lt;/form&gt;
  &lt;/body&gt;
  &lt;/html&gt;
  </code></pre>
  
  <p>when i run the servlet, met an error :</p>
  
  <pre><code>HTTP Status 404 - Servlet NewServlet is not available
  
  --------------------------------------------------------------------------------
  
  type Status report
  
  message Servlet NewServlet is not available
  
  description The requested resource (Servlet NewServlet is not available) is not available.
  </code></pre>
  
  <p>i checked the folder : WEB-INF or any folder else and can't see file .class</p>
  
  <p>How is this caused and how can I solve it?</p>