aspose 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
Register / Login


Win a copy of Mongo DB Applied Patterns this week in the MongoDB forum
or a resume review from Five Year Itch in the Jobs Discussion forum!
JavaRanch » Java Forums » Certification » Web Component Certification (SCWCD/OCPJWCD)
Reply 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: 14669
    
  11

Use POST as the form method, not Post.



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

Joined: Sep 06, 2009
Posts: 219
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://ej-technologies/jprofiler - if it wasn't for jprofiler, we would need to run our stuff on 16 servers instead of 3.
 
subject: HTTP method GET is not supported by this URL
 
Similar Threads
Error allocating a servlet instance
<url-pattern>/</url-pattern> and response.sendRedirect("index.html")
I really stuck and need help
Starting out on Servlets - from Head First Servlets and JSP
Get and Post with Init Params