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: 2407
posted
0
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: 52
posted
0
Ok,Sir
Later on i will keep this in mind while posting.
Mohini Dhanaskar
Ranch Hand
Joined: Mar 27, 2012
Posts: 52
posted
0
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: 2407
posted
1
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.