wood burning stoves 2.0*
The moose likes Web Component Certification (SCWCD/OCPJWCD) and the fly likes Tomcat error. 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 "Tomcat error." Watch "Tomcat error." New topic
Author

Tomcat error.

Sen Aff
Ranch Hand

Joined: Mar 08, 2007
Posts: 63
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.
Chandra Bhatt
Ranch Hand

Joined: Feb 28, 2007
Posts: 1707

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 ]

cmbhatt
Christophe Verré
Sheriff

Joined: Nov 24, 2005
Posts: 14687
    
  16

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.


[My Blog]
All roads lead to JavaRanch
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Tomcat error.
 
Similar Threads
Error accessing application in Tomcat 5
Can not run servlet
Not able to run servlet-HTTP status404
Problem getting Servlets to work correctly with Tomcat
Error allocating a servlet instance