Win a copy of OCP Java SE 8 Programmer II Exam Study Guide this week in the OCP forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

my request never goes to the doPost method  RSS feed

 
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello everybody, i hope you are fine.


i'm trying to submit a simple form:



As you can see, my form method is POST
but when it comes to my servlet, it always goes to doGet() and i dont know why:


can somebody help me please?
 
Saloon Keeper
Posts: 1804
238
Android Angular Framework Eclipse IDE Java Linux MySQL Database Redhat TypeScript
  • Likes 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I ran your code and I saw dopost printed at the console.  I'm guessing that your web server is running an older version of your code which called the doGet method and didn't print the doPost message:

Try adding something like this to your servlet to print the method before it is handled by doGet or doPost:
 
Greg Artisi
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
i 'll try . Thank you
 
Consider Paul's rocket mass heater.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!