struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "starki78" <stark...@libero.it>
Subject Using saveToken and isTokenValid
Date Tue, 14 Mar 2006 15:08:04 GMT
Hi, I try to create a solution that prevents several
submits.

Therefore I place at the end of the first action:

   saveToken(request); 

and in the second:

 if (!isTokenValid(request,true)) {
  // duplicate submit, return some error message to user
      
           ActionMessage msg = new ActionMessage("errors.DuplicateSubmit","<b>Don't
submit twice</b>");
           
         messages.add("msg", msg);  
         saveMessages(request, messages);       
         return mapping.findForward("error");
  
       }
else {
  normal processing

}

The result is that then I click three times I get the warning
that I would like to know but 
the first request isn't executed excecuted anymore.

Can you help me? Has someone a similar solution?

Nice greetings
Starky








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


Mime
View raw message