I think you misunderstood my problem. On first page I create a token and put it on a map. I then put the token as hidden fields in the page's form. When user submit the page, I check if the token is still exists on the map.
If not then maybe the user pressed back on his browser and resubmit again, or double clicked the link. (My application can handle this by returning a *default* page based on its current value.) If the token is on the list, it's removed and the a new token was created and put on the list and on the form. The cycles continues... But this approach has a couple of flaws: 1. if user double clicked on a link: the same token was sent twice. The 1st request processed by my app will never be seen by user, he only see the page for the 2nd request, which is the *default* page. Suppose the 1st request returned an error message or something he'll never see it. 2. if the user click Abort before receiving the response, he's stuck with the old token which was *REMOVED* by my app, when it's processing the request. The page that contains the new token was never received by the user. He can't resubmit. I hope it's clear (sigh) English composition is not my subject.. :( I've not found any solution to this, so please if someone can share any solution. TIA Antony. > -----Original Message----- > From: Ralph Einfeldt [mailto:[EMAIL PROTECTED] > Sent: 22 April 2004 13:49 > To: Tomcat Users List > Subject: RE: How to limit concurrent requests by same user > > > You just have to remove the token no matter what happens. > > try { > > // store token > > // Do the processing and create output > > } catch(SomeException ex) { // Optional > > } finally { > > // remove token > > } > > > -----Original Message----- > > From: Antony [mailto:[EMAIL PROTECTED] > > Sent: Thursday, April 22, 2004 8:38 AM > > To: 'Tomcat Users List' > > Subject: RE: How to limit concurrent requests by same user > > > > > > I tried this approach once, I got stuck on this scenario: > > user submit a form, jsp/servlet processes and remove the > token from list. > > But the user click abort before the page was transferred, > thus leaving > > him with old token. He can't ever submit the page again. > Anyone have > > think of a solution for this can please share? > > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
