wood burning stoves*
The moose likes Servlets and the fly likes HTTP method GET is not supported by this URL Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Servlets
Bookmark "HTTP method GET is not supported by this URL" Watch "HTTP method GET is not supported by this URL" New topic
Author

HTTP method GET is not supported by this URL

Mohini Dhanaskar
Ranch Hand

Joined: Mar 27, 2012
Posts: 54


I m getting the following error while running the servlet

"HTTP Status 405 - HTTP method GET is not supported by this URL"

"type Status report

message HTTP method GET is not supported by this URL

description The specified HTTP method is not allowed for the requested resource (HTTP method GET is not supported by this URL)."

Can anybody help me out in dis???

my servlet code is as follows:


Plzzz Plzzz help me out ASAP....
Tim Moores
Rancher

Joined: Sep 21, 2011
Posts: 2408
Your servlet does not override the doGet method, and the default implementation that it inherits from HttpServlet causes a 405.
Mohini Dhanaskar
Ranch Hand

Joined: Mar 27, 2012
Posts: 54
Ok,Sir

Later on i will keep this in mind while posting.
Mohini Dhanaskar
Ranch Hand

Joined: Mar 27, 2012
Posts: 54
Sir,can you please explain me why there is a need to override doGet method,when already doPost method
is there.
Tim Moores
Rancher

Joined: Sep 21, 2011
Posts: 2408
GET and POST are different methods, used for different purposes. They are not interchangeable. You may want to read up on HTTP to learn more about their similarities and their differences, and their respective use cases.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: HTTP method GET is not supported by this URL