wood burning stoves 2.0*
The moose likes Servlets and the fly likes HTTP Status 405 Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Java » Servlets
Bookmark "HTTP Status 405" Watch "HTTP Status 405" New topic

HTTP Status 405

Pranav Pal
Ranch Hand

Joined: Nov 04, 2007
Posts: 74
What causes the following error:
HTTP Status 405 - HTTP method POST is not supported by this URL

Thanks in advance

Hakuna Matata!
Ulf Dittmer

Joined: Mar 22, 2005
Posts: 41182
That message is actually very much to the point: you're using HTTP POST to access an URL that does not support POST. If the URL is mapped to a servlet, it most likely means that you have not provided an implementation of the doPost method. (The doPost method inherited from GenericServlet generates this error.)

Ping & DNS - my free Android networking tools app
Raj Kumar Bindal
Ranch Hand

Joined: Apr 15, 2006
Posts: 418
Once we have overridden doPost() of GenericServlet,how does it gets called
Ulf Dittmer

Joined: Mar 22, 2005
Posts: 41182
It gets called as the result of submitting an HTML form that has an attribute method="POST".
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
subject: HTTP Status 405
Similar Threads
Pass radio button to servlet
Enthuware Mock Exam Question
UrlRewriting+servlets -Error
Problem getting servlets working
Unable to direct to page after login