struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Juan Pablo" <jpsabad...@gmail.com>
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
	form.submit();
}
...
...
...
<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.

Regards,


-----Mensaje original-----
De: Frank W. Zammetti [mailto:fzlists@omnytex.com] 
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


-- 
Frank W. Zammetti
Founder and Chief Software Architect
Omnytex Technologies
http://www.omnytex.com
AIM/Yahoo: fzammetti
MSN: fzammetti@hotmail.com
Author of "Practical Ajax Projects With Java Technology"
  (2006, Apress, ISBN 1-59059-695-1)
Java Web Parts - http://javawebparts.sourceforge.net
  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
'real'
> 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: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org


Mime
View raw message