• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

HTTP method GET is not supported by this URL

 
Mohini Dhanaskar
Ranch Hand
Posts: 55
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator


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
Bartender
Posts: 2839
46
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Your servlet does not override the doGet method, and the default implementation that it inherits from HttpServlet causes a 405.
 
Mohini Dhanaskar
Ranch Hand
Posts: 55
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Ok,Sir

Later on i will keep this in mind while posting.
 
Mohini Dhanaskar
Ranch Hand
Posts: 55
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Sir,can you please explain me why there is a need to override doGet method,when already doPost method
is there.
 
Tim Moores
Bartender
Posts: 2839
46
  • Likes 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic