Problem : HTTP Status 405 - HTTP method GET is not supported by this URL Solution : This is always caused by following two reasons 1) You do not have a valid doGet() method, when you type the servlet’s path in address bar directly, the web container like Tomcat will try to invoke the doGet() method. public void doGet (HttpServletRequest request, HttpServletResponse response) throws IOException{ } 2) You made a HTTP post request from a HTML form, but you do not have a doPost() method to handle it. The doGet() cannot handle the “Post” request. public void doPost (HttpServletRequest request, HttpServletResponse response) throws IOException{ } Example of wrong doGet() and doPost() method protected void doPost (HttpServletRequest request, HttpServletResponse response, PrintWriter Out){ } These two methods get() and post() must have only 2 parameters otherwise it will not be called.
A Full Stack developer who is facing problems in development cycle and here you find solution of errors of those problems.This includes all exception and configuration issues. Solutions which i have written in blog are the one which worked for me after killing my time :) .