• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Problem in HFSJ Ch3,help~~

 
Kidd He
Ranch Hand
Posts: 65
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I work with win2000,Tomcat 5.5.17,JDK5.0_9

I have trouble at "The first version of the controller servlet".
When I "compiling,deploy,and test the controller servlet",hitting the "Submit",there always a http 405 error,it prints:

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).
 
Niranjan Deshpande
Ranch Hand
Posts: 1277
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
HTTP Status 405 - HTTP method POST is not supported by this URL

this means your servlet has a doGet( ) method and your request wants a POST method ( the action attribute of html's form tag is asking for method="post)

maku sure you add this in your servlet



hth
 
Kidd He
Ranch Hand
Posts: 65
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by Niranjan Deshpande:

this means your servlet has a doGet( ) method and your request wants a POST method ( the action attribute of html's form tag is asking for method="post)

maku sure you add this in your servlet



hth


Thanks Niranjan !!!
I found I wrote the method "doPost" in the wrong way----"dopost".I should be more careful.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic