This week's book giveaway is in the Clojure forum.
We're giving away four copies of Clojure in Action and have Amit Rathore and Francis Avila on-line!
See this thread for details.
Win a copy of Clojure in Action this week in the Clojure forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Multiple Http Request

 
Navi Lock
Ranch Hand
Posts: 39
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Howdy Folks,
need your expertise on the below..
Issue is to 'prevent multiple submits' from the same page..
Meaning a user could possibly press the same button more than one time.

Cannot use Scripting.

Have tried using isTokenValid()/resetToken()/saveToken().
The above works.. i am able to differentiate between the first and the successive http request's.

Question is .. what to do with the successive request that come in ??
And at the same time the application is waiting for the underlying processes to be completed initiated due to the first request.

I still want the customer to see the result page only invoked due to the first 'submit'.
Is there a way to ignore the successive submit request's?

Thanks in advance,
-Navi

[ November 21, 2007: Message edited by: Navi Nav ]
[ November 21, 2007: Message edited by: Navi Nav ]
 
Navi Lock
Ranch Hand
Posts: 39
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Guya,Any thing on the above q ?..

Thanks,
-Navi
 
Ulf Dittmer
Rancher
Pie
Posts: 42966
73
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Have tried using isTokenValid()/resetToken()/saveToken().
The above works.. i am able to differentiate between the first and the successive http request's.

Question is .. what to do with the successive request that come in ??


That's a bit of a strange question to ask. You're able to differentiate between the first and any subsequent submits - great, that's what you want to be able to do. What exactly should happen for the second request is a matter of your business logic (or how user-friendly you want to be). So, "what to do with the successive request that come in" is a question for you.
 
Navi Lock
Ranch Hand
Posts: 39
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
HI Ulf, Thanks for responding..

I still want the customer to see the result page only invoked due to the first 'submit'.
Is there a way to ignore the successive submit request's?


That is what i wanted to do.. need to know how to do the above.

Thanks again,
-Navi
 
Navi Lock
Ranch Hand
Posts: 39
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Any other suggestions guys ??

Thanks,
-Navi
 
Ulf Dittmer
Rancher
Pie
Posts: 42966
73
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I still want the customer to see the result page only invoked due to the first 'submit'.
Is there a way to ignore the successive submit request's?


Once again, you said you knew how to differentiate between the first and subsequent requests. So what prevents you from ignoring subsequent ones?
 
Navi Lock
Ranch Hand
Posts: 39
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Yes.. that is what i want to know..
How to ignore the subsequent requests..

what are/is the way to ignore the subsequent request's??
Or rephrasing - How to kill/nullify the subsequent request, while the first request is still being processed and hasn't reached a decision point.

I would like to show the result page based only on the first request only..


Thanks,
-Navi.
 
Java Chandu
Greenhorn
Posts: 1
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I'm also facing same problem in following situations
1. If i want to show some exception on the same input page
2. In case is i have action to action forward

My page contains multiple 3-4 button which has different actions. I want to avoid multiple clicks also without javascript.
 
Brent Sterling
Ranch Hand
Posts: 948
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I missed this thread when it was first posted...I think I was out eating Turkey!

A few years ago I played with trying to get token working in my application to prevent double submissions. One of the major issues for me is the one mentioned in this thread. I ended up going with a client-side JavaScript solution that works good enough.

There is an article somewhere out there on the web that has a solution. It is a pretty complicated solution that involves storing data on the session. I tried a couple searches...hmmm...I found this article that might be it: http://www.javaworld.com/javatips/jw-javatip136.html?page=1

- Brent
 
Scott Selikoff
author
Saloon Keeper
Posts: 3897
16
Eclipse IDE Flex Google Web Toolkit
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
"Navi Nav"

Your name still does not conform to the JavaRanch Naming Policy. Please review the policy and update it appropriately. This is your second warning.

Scott Selikoff
 
I agree. Here's the link: http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic