This week's book giveaway is in the Clojure forum.
We're giving away four copies of Clojure in Action and have Amit Rathore and Francis Avila on-line!
See this thread for details.
Win a copy of Clojure in Action this week in the Clojure forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

servlet pblm

 
sunitha thejaswi
Ranch Hand
Posts: 34
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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

error

please let me know where i am going wrong.

thanks a lot in advance
sunitha
 
Bosun Bello
Ranch Hand
Posts: 1510
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
It's telling you that you did not implement doPost in your servlet and the form you are submitting specified a method of "POST"
 
vipul patel
Ranch Hand
Posts: 146
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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: http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic