Give Url to ur servlet through @WebServlet(name = "Controller", urlPatterns = {"/Controller"})
@WebServlet(name = "Controller", urlPatterns = {"/Controller"}) public class Controller extends HttpServlet { protected void processRequest(HttpServletRequest request, HttpServletResponse response) { } protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { processRequest(request, response); } protected void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { processRequest(request, response); } }