This week's book giveaway is in the Design forum.
We're giving away four copies of Design for the Mind and have Victor S. Yocco on-line!
See this thread for details.
Win a copy of Design for the Mind this week in the Design forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

doPost() called twice

 
lisa m
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I am seeing a problem in my servlet where the doPost() method is firing off twice, right in a row. It doesn't happen consistantly, however. Just every once in awhile. Usually after it happens, I'll try it again and it will only fire off once.
The first time doPost() is called, it contains all the parameters from the form, including the information from the submit buttons. The second time, it contains everything except the information from the submit button.
Does anyone have any suggestions on what might be causing this? Any input would be greatly appreciated.
 
Ronald Francis
Ranch Hand
Posts: 30
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
One usual problem is hitting the submit button multiple times (before the browser gets a chance to remove the page)..
 
Juanjo Bazan
Ranch Hand
Posts: 231
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Try to avoid the problem using javascript in the client side and/or storing some state info in session and validating in your servlet.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic