GeeCON Prague 2014*
The moose likes Struts and the fly likes For a single submission on a jsp , two instances are generated in baseaction class Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


JavaRanch » Java Forums » Frameworks » Struts
Bookmark "For a single submission on a jsp , two instances are generated in baseaction class" Watch "For a single submission on a jsp , two instances are generated in baseaction class" New topic
Author

For a single submission on a jsp , two instances are generated in baseaction class

Lakshmi friend
Greenhorn

Joined: Jan 03, 2008
Posts: 1
When i click once on a button called save , the process done in the flow from baseAction till the DAO, it is all twice. i.e if i have something like a system.out.println("hello") in the DAO with no loop. Hello is getting printed twice in my console , also we checked it with a static count variable as and when the control enters the action class. The count value is 2 for a single submission.
But this functionality works fine on my colleagues machine. everything being same configuration .Unable to understand as to what the problem might be.
Any Help will be appreciated on this.
Merrill Higginson
Ranch Hand

Joined: Feb 15, 2005
Posts: 4864
Check to see if you have a submit button that also has an onclick event. That can cause this type of behavior. Example:

If you want to submit using JavaScript, use an html:button tag instead.


Merrill
Consultant, Sima Solutions
 
GeeCON Prague 2014
 
subject: For a single submission on a jsp , two instances are generated in baseaction class