• 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
  • Tim Cooke
  • paul wheaton
  • Paul Clapham
  • Ron McLeod
Sheriffs:
  • Jeanne Boyarsky
  • Liutauras Vilda
Saloon Keepers:
  • Tim Holloway
  • Carey Brown
  • Roland Mueller
  • Piet Souris
Bartenders:

Problem in HFSJ Ch3,help~~

 
Ranch Hand
Posts: 65
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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).
 
Ranch Hand
Posts: 1277
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.
 
reply
    Bookmark Topic Watch Topic
  • New Topic