File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Web Component Certification (SCWCD/OCPJWCD) 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 » Certification » Web Component Certification (SCWCD/OCPJWCD)
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

Nabila Mohammad
Ranch Hand

Joined: Nov 05, 2007
Posts: 661
I am trying to run this simple progam and i have no idea why i am getting this eror since i am not even using "Get"
Can some one help meout in this.

form.html




DrinkSelect.java




web.xml


The future belongs to those who believe in the beauty of their dreams.Dream BIG!
Pavan Tanay
Greenhorn

Joined: Feb 02, 2006
Posts: 21
What error are you getting?
Chinmaya Chowdary
Ranch Hand

Joined: Apr 21, 2008
Posts: 432
Hi Nabila. Use
Christophe Verré
Sheriff

Joined: Nov 24, 2005
Posts: 14688
    
  16

Use POST as the form method, not Post.



[My Blog]
All roads lead to JavaRanch
Salil Vverma
Ranch Hand

Joined: Sep 06, 2009
Posts: 255

Hey Nabila,

I think, with this code while clicking on submit button you might be getting an dialogue box with an option of save or open with. This is because of setting incorrect content type in your code ie


It should be "text/html". The below code would work fine with your jsp and web.xml entries -



I hope this would solve your problem.


Regards
Salil Verma
Nabila Mohammad
Ranch Hand

Joined: Nov 05, 2007
Posts: 661
Thanks ppl..
Its working!!
ruchilalla lallalalla
Greenhorn

Joined: Dec 23, 2009
Posts: 1
I got the exact error and i resolved it by using HttpServletRequest instead of ServletRequest interface in doget and doPost




 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: HTTP method GET is not supported by this URL