• 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 Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Tomcat error.

 
Ranch Hand
Posts: 63
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi,

I was trying the tutorial in HFSJ, page 168.

When i tried to access the servlet from the URL, just as it is
demonstrated on page 177, i got a Tomcat error.

The error says:
HTTP method GET is not supported by this URL
(i was not even using GET, I used POST)

However, when i access the servlet using an HTML page, it works fine.

Can anyone explain to me why this discrepancies.

Thank you very much for your time.

Sen Aff.
 
Ranch Hand
Posts: 1710
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator


The error says:
HTTP method GET is not supported by this URL
(i was not even using GET, I used POST)




If there is GET request, your servlet must override the doGet(...) method
and same applies to http POST request too as you have to override doPost(...)
method in your servlet if there is POST request.


Thanks,
[ June 03, 2007: Message edited by: Chandra Bhatt ]
 
Sheriff
Posts: 14691
16
Eclipse IDE VI Editor Ubuntu
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

i was not even using GET, I used POST


If you tried to access it by typing the URL in the address bar, then it's a GET, not a POST.
 
reply
    Bookmark Topic Watch Topic
  • New Topic