• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Multiple Http Request

 
Ranch Hand
Posts: 39
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Guya,Any thing on the above q ?..

Thanks,
-Navi
 
Rancher
Posts: 43081
77
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Any other suggestions guys ??

Thanks,
-Navi
 
Ulf Dittmer
Rancher
Posts: 43081
77
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.
 
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.
 
Ranch Hand
Posts: 948
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
 
author
Posts: 4335
39
jQuery Eclipse IDE Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
 
He's my best friend. Not yours. Mine. You can have this tiny ad:
a bit of art, as a gift, the permaculture playing cards
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic