tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Vy Ho <st946...@drexel.edu>
Subject Re: Avoiding double execution of JSP from double posting of request
Date Thu, 26 Aug 2004 21:49:50 GMT
Yes,

Put a unique key on the client computer (cookie) and also on the 
client's session object.  When they click, synchronize the handler and 
check for the cookie and the session object's key.  If they are not 
matched, then this is a duplicate.  Next, remove the key from the 
session object and process the request.  If a same form is send back, 
generate a different unique key and repeat the whole process.


Bill Bruns wrote:

>I believe this is a double-click type of problem, in other words a double
>post.
>So the user clicks twice (quickly) and the second click happens before the
>"next" page comes from the server.
>This could be handled by putting javascript in to check for double clicks.
>But I would rather handle it on the server side.
>
>Is there a way on the server side to prevent duplicate requests from the
>same client?
>This is using Tomcat 4 and Apache httpd 2 connected with mod_jk on Solaris.
>
>Again, most of the time this does not cause a problem from the client's
>point of view.
>But, it seems like a common problem.
>I'm hoping someone has a solution.
>
>Bill Bruns
>
>
>---------------------------------------------------------------------
>To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
>For additional commands, e-mail: tomcat-user-help@jakarta.apache.org
>
>  
>


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


Mime
View raw message