struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Juan Pablo" <>
Subject RE: Double Execution of Struts Actions
Date Fri, 08 Sep 2006 22:33:45 GMT
Daniel, may be you are doing this:

Function yourFunction(){
	//your code here
<input type="submit" onclick="yourFunction()" value="BLABLABLA">

So when you click BLABLABLA the form will be submitted two times; the first
because your clicking a submit button and the second when the function
yourFunction() is executed.


-----Mensaje original-----
De: Frank W. Zammetti [] 
Enviado el: Jueves, 07 de Septiembre de 2006 07:14 p.m.
Para: Struts Users Mailing List
Asunto: Re: Double Execution of Struts Actions

Hi Daniel,

This is most usually a result of some Javascript executing that causes 
the form submission, while the usual form submission occurs as well... 
any chance your doing something like that?

If not, my first suggestion would be to fire up Firefox, and install 
Firebug if you don't have it already, and watch its console while you do 
whatever it is that causes the double-execution... see if the client is 
sending two requests or not... that will narrow down the scope of the 
problem significantly... report back with results and we'll see if we 
can help track it down.


Frank W. Zammetti
Founder and Chief Software Architect
Omnytex Technologies
AIM/Yahoo: fzammetti
Author of "Practical Ajax Projects With Java Technology"
  (2006, Apress, ISBN 1-59059-695-1)
Java Web Parts -
  Supplying the wheel, so you don't have to reinvent it!

Daniel Chacón Sánchez wrote:
> *Double Execution of Struts Actions*
> ------------------------------
> I'm having trouble figuring out some strange behavior,some actions are
> executed *twice* on every submission.
> The app works fine, but my logs show that the first execution is the
> one.  But there is also a log of another call through the code. I can't
> figure out where this one is coming from or going to.
> Someone who can help me, i saw anothers threads about this topic but none
> had solved the problem!
> (Spanish)
> *Doble llamado a una acción de struts*
> Extrañamente algunas veces cuado llamo a una acción se llama* 2 veces*, es
> extraño porque llevo trabajado bastante con struts y esto nunca había 
> pasado

To unsubscribe, e-mail:
For additional commands, e-mail:

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message