I've got a page here. When I click the submit button, I get the 404 page saying:
HTTP Status 404 - /Email/EmailGet
type Status report
message /Email/EmailGet
description The requested resource is not available.
Apache Tomcat/7.0.47
Code:
    <%@ page language="java" contentType="text/html; charset=ISO-8859-1"
    pageEncoding="ISO-8859-1"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<title>Insert title here</title>
</head>
<body>
    <form action="EmailGet" method="GET">
        Email: <input type="text" name="email"> <br> Password: <input
            type="password" name="password"> <br> <input
            type="submit" value="Submit">
    </form>
</body>
</html>
Here's the EmailGet code:
package email;
import java.io.IOException;
import javax.mail.Session;
import javax.servlet.RequestDispatcher;
import javax.servlet.ServletException;
import javax.servlet.annotation.WebServlet;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import javax.servlet.http.HttpSession;
/**
 * Servlet implementation class Controller
 */
@WebServlet("/EmailGet")
public class EmailGet extends HttpServlet {
    private static final long serialVersionUID = 1L;
    /**
     * @see HttpServlet#HttpServlet()
     */
    public EmailGet() {
        super();
    }
    /**
     * @see HttpServlet#doGet(HttpServletRequest request, HttpServletResponse response)
     */
    protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
        // Gets the entered email and password
        String username = request.getParameter("email");
        String password = request.getParameter("password");
        //Creates the session and sets the session attributes
        HttpSession session = request.getSession();
        session.setAttribute("username", username);
        session.setAttribute("password", password);
        RequestDispatcher dispatcher;
        //Calls the setCredentials method to check if entered credentials are valid
        boolean result = SendSMTPMail.setCredentials(username, password);
        //if valid, forwards to send page
        if (result == true) {
            dispatcher = request.getRequestDispatcher("send.jsp");
            dispatcher.forward(request, response);      
        }
        //if not valid, forwards to index page with error message displayed
        else {
            dispatcher = request.getRequestDispatcher("indexerror.jsp");
            dispatcher.forward(request, response);      
        }
    }
    /**
     * @see HttpServlet#doPost(HttpServletRequest request, HttpServletResponse response)
     */
    protected void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
        // TODO Auto-generated method stub
    }
}
Any ideas? It used to forward the page fine, but seems not to be working now.
Each jsp page runs fine individually, it's just the forwarding that isn't working.
 
    