title: JSP 404 Error Servlet Not Found
body: <p>I have a signIn.jsp which allows users to sign into their account. This HTML form will lead to a java servlet. It works locally but doesn't work on the paid web host server that I bought. It kept giving me a <code>404 error /LoginServlet cannot be found.</code> Thanks in advance!</p>
  
  <p>Below is my jsp:</p>
  
  <pre><code>    &lt;form action="LoginServlet" method="POST" style="background-color: transparent;"&gt;                                  
      &lt;input type="text" id="username" name="username" placeholder="Username" style=" height: 25px" value=""/&gt;                               
      &lt;input type="password" id="password" name="password" placeholder="Password" style=" height: 25px" value=""/&gt;                                  
      &lt;input type="submit" name="submit" class=" login-submit" value="Sign-In" style=" height: 25px" /&gt;                              
      &lt;/form&gt;
  </code></pre>
  
  <p>Below is my web.xml</p>
  
  <pre><code>     &lt;?xml version="1.0" encoding="UTF-8"?&gt;
      &lt;web-app xmlns="http://java.sun.com/xml/ns/javaee" 
          xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
          xmlns:web="http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd" 
          xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd"
          version="2.5"&gt;
          &lt;session-config&gt;
              &lt;session-timeout&gt;
                  30
              &lt;/session-timeout&gt;
          &lt;/session-config&gt;
          &lt;display-name&gt;ThinkAuction&lt;/display-name&gt;
          &lt;welcome-file-list&gt;
              &lt;welcome-file&gt;index.jsp&lt;/welcome-file&gt;
          &lt;/welcome-file-list&gt;
          &lt;servlet&gt;
              &lt;servlet-name&gt;LoginServlet&lt;/servlet-name&gt;
              &lt;servlet-class&gt;User.LoginServlet&lt;/servlet-class&gt;
          &lt;/servlet&gt;
          &lt;servlet-mapping&gt;
              &lt;servlet-name&gt;LoginServlet&lt;/servlet-name&gt;
              &lt;url-pattern&gt;/LoginServlet&lt;/url-pattern&gt;
          &lt;/servlet-mapping&gt;
      &lt;/web-app&gt;
  </code></pre>
  
  <p>below is my LoginServlet:</p>
  
  <pre><code>public class LoginServlet extends HttpServlet {
          //private static final long serialVersionUID = 1L;
          static private int loginSuccessful = 0; etc...}
  </code></pre>