This week's book giveaway is in the Servlets forum.
We're giving away four copies of Murach's Java Servlets and JSP and have Joel Murach on-line!
See this thread for details.
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 Murach's Java Servlets and JSP this week in the Servlets 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: 41040
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: 41040
It gets called as the result of submitting an HTML form that has an attribute method="POST".
jQuery in Action, 2nd edition
subject: HTTP Status 405
Similar Threads
UrlRewriting+servlets -Error
Problem getting servlets working
Enthuware Mock Exam Question
Unable to direct to page after login
Pass radio button to servlet