Problem :HTTP Status 405 – HTTP method GET is not supported by this URL
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.
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.
Example of wrong doGet() and doPost() method
These two methods get() and post() must have only 2 parameters otherwise it will not be called.
73 total views, no views today