• Post Reply Bookmark Topic Watch Topic
  • New Topic

HTTP method GET is not supported by this URL  RSS feed

 
Raghav Mathur
Ranch Hand
Posts: 641
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
HI
i don't understand that why am i getting this error when i,am not even using a doGet(). i,am using doPost().
PLease help me guys .
 
William Brogden
Author and all-around good cowpoke
Rancher
Posts: 13078
6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Something in your code and/or html page is accessing a URL that looks like a GET to the servlet.
You might as well define a doGet and dump the request information so you can figure out where it came from. Your servlet engine probably came with an example of doing this - typically called SnoopServlet
Bill
 
Raghav Mathur
Ranch Hand
Posts: 641
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I don't have an html page . I,am just simply printing a string using doPost().
 
Raghav Mathur
Ranch Hand
Posts: 641
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The prob what i was refering to in my previous post is solved but i still don;t understand what could be the reason for the servelet to stop working and give the error 405 when i try to provke the servelet through an html page . As you said the servlet expects a get whereas there is a post which is taking place. What could be the reason ?
I have a 2 textboxes from which the values are being transfered to the servlet.
Originally posted by William Brogden:
Something in your code and/or html page is accessing a URL that looks like a GET to the servlet.
 
William Brogden
Author and all-around good cowpoke
Rancher
Posts: 13078
6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
If you have an HTML FORM, and the form tag does not specify method="POST" then the form will be submitted as a GET.
Bill
 
Raghav Mathur
Ranch Hand
Posts: 641
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The Html page specifies a "POST" but also the link to the servlet contains extra path information .
e.g:- xyz?nanana=kjakja&jhajha=rax
Should this be a prob ?
Originally posted by William Brogden:
If you have an HTML FORM, and the form tag does not specify method="POST" then the form will be submitted as a GET.
Bill
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!