File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Web Component Certification (SCWCD/OCPJWCD) and the fly likes servlet pblm 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 "servlet pblm" Watch "servlet pblm" New topic

servlet pblm

sunitha thejaswi
Ranch Hand

Joined: Nov 14, 2005
Posts: 34
HI everybody
I am new to this forum.I have just started studing Head first servlets and Jsp. I have installed eclipse and downloaded tomcat. i even added tomcat plugin to eclipse.
I tried the first beer example.
when i tried to run i got

HTTP Status 405 - HTTP method POST is not supported by this URL


type :Status report

message :HTTP method POST is not supported by this URL

description The specified HTTP method is not allowed for the requested resource (HTTP method POST is not supported by this URL).


Apache Tomcat/5.0.28


please let me know where i am going wrong.

thanks a lot in advance
Bosun Bello
Ranch Hand

Joined: Nov 06, 2000
Posts: 1510
It's telling you that you did not implement doPost in your servlet and the form you are submitting specified a method of "POST"

So much trouble in the world -- Bob Marley
vipul patel
Ranch Hand

Joined: Oct 16, 2005
Posts: 146
In your servlet, I believe you have only implemeted doGet(..) method. But In HTML form, you are submitting a form data using POST method, so when container calls a service() method of GenericServlet class, it tries to find doPost() method. (Because the type of request coming from browser is POST). But doPost() does not exist so you are getting that error.
I agree. Here's the link:
subject: servlet pblm
It's not a secret anymore!