• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Ron McLeod
  • Paul Clapham
  • Bear Bibeault
  • Junilu Lacar
Sheriffs:
  • Jeanne Boyarsky
  • Tim Cooke
  • Henry Wong
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • salvin francis
  • Frits Walraven
Bartenders:
  • Scott Selikoff
  • Piet Souris
  • Carey Brown

HTTP method GET is not supported by this URL

 
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....
 
Saloon Keeper
Posts: 6588
160
Android Mac OS X Firefox Browser VI Editor Tomcat Server Safari
  • 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
Saloon Keeper
Posts: 6588
160
Android Mac OS X Firefox Browser VI Editor Tomcat Server Safari
  • 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.
 
Hey cool! They got a blimp! But I have a tiny ad:
Building a Better World in your Backyard by Paul Wheaton and Shawn Klassen-Koop
https://coderanch.com/wiki/718759/books/Building-World-Backyard-Paul-Wheaton
    Bookmark Topic Watch Topic
  • New Topic