This week's book giveaways are in the Refactoring and Agile forums.
We're giving away four copies each of Re-engineering Legacy Software and Docker in Action and have the authors on-line!
See this thread and this one for details.
Win a copy of Re-engineering Legacy Software this week in the Refactoring forum
or Docker in Action in the Cloud/Virtualization forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Action class being called twice from jsp

 
Mallika R Kumar
Ranch Hand
Posts: 38
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
I have a jsp page, in which user selects values in a check box. This value gets populated in a form bean. Currently, if user checks one box, two rows are being inserted into a database table - whereas in my Action class, I am implementing logic to insert only one row. Somehow, the Action class seems to be getting executed twice. I can see the methods getting executed twice, but I am not sure why they are being called twice. Could anyone give me ideas as to what I'm doing wrong ?

Thanks,
Mallika.
 
Aman Verma
Greenhorn
Posts: 15
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I think u might be calling a java script method such as onclick of a submit button and in onclick() method u r calling submit once again.

Regards,
-Aman
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic