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 404 error /LoginServlet cannot be found.
Thanks in advance!
Below is my jsp:
<form action="LoginServlet" method="POST" style="background-color: transparent;">
<input type="text" id="username" name="username" placeholder="Username" style=" height: 25px" value=""/>
<input type="password" id="password" name="password" placeholder="Password" style=" height: 25px" value=""/>
<input type="submit" name="submit" class=" login-submit" value="Sign-In" style=" height: 25px" />
</form>
Below is my web.xml
<?xml version="1.0" encoding="UTF-8"?>
<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">
<session-config>
<session-timeout>
30
</session-timeout>
</session-config>
<display-name>ThinkAuction</display-name>
<welcome-file-list>
<welcome-file>index.jsp</welcome-file>
</welcome-file-list>
<servlet>
<servlet-name>LoginServlet</servlet-name>
<servlet-class>User.LoginServlet</servlet-class>
</servlet>
<servlet-mapping>
<servlet-name>LoginServlet</servlet-name>
<url-pattern>/LoginServlet</url-pattern>
</servlet-mapping>
</web-app>
below is my LoginServlet:
public class LoginServlet extends HttpServlet {
//private static final long serialVersionUID = 1L;
static private int loginSuccessful = 0; etc...}