wood burning stoves 2.0*
The moose likes Struts and the fly likes Action class being called twice from jsp Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "Action class being called twice from jsp" Watch "Action class being called twice from jsp" New topic

Action class being called twice from jsp

Mallika R Kumar
Ranch Hand

Joined: Jan 21, 2004
Posts: 38
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 ?

Aman Verma

Joined: May 10, 2005
Posts: 15
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.

With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
subject: Action class being called twice from jsp
Similar Threads
Servlet filter being invoked twice per request by Container.
Problem with printing a JTable
Focus Lost - Getting called twice.
Problem in generating a sequence for the Primary Key
Struts + I18N