Trying to learn JSP and making my first project, and I absolutely cannot get the url mapping to work. I tried mapping in web.xml at first, but that didn't work, so I upgraded to javax servlet 3.0.1 and tried the annotation mapping, but again I get a 404 error. Not sure what I'm doing wrong.
I have a simple html form with
<form action="Login" method="POST">
        <div align="center">
            <table>
                <tr>
                    <td>User Name</td>
                    <td><input type="text" name="username" /></td>
                </tr>
                <tr>
                    <td>Password</td>
                    <td><input type="password" name="password" /></td>
                </tr>
                <tr>
                    <td></td>
                    <td><input type="submit" value="Login" /></td>
                </tr>
            </table>
        </div>
    </form>
and a Servlet with
@WebServlet("/Login")
public class LoginServlet extends HttpServlet {
    protected void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
    //...
}
Can anyone please advise me on what I may be doing wrong? Thanks
