• 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

Handling double submit at server side, displays balnk page.

 
Ranch Hand
Posts: 43
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi,

My aim is to display expected page to user and process his request only once despite double submits.

I am able to detect double submit using Token Synchronization and now my porblem is to handle the duplicat requests after I detect them. Please see the code below.

I tried saving the ServletResponse in session and locking it, when done with the first request other waiting threads would pick up the saved response object and will try to write its content through the response object of last submitted request.

But the successful If condition doesn't work as I thought of working...instead it displays blank page.




Please suggest.

Thanks.
 
Waez Ali
Ranch Hand
Posts: 43
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Any input on this one please !! Would be much appriciated.


Regards,
Waez.
 
Ranch Hand
Posts: 349
Hibernate Eclipse IDE Spring
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I would restrict double submit in the client side rather at the server side. http://www.willmaster.com/library/demo/singleclick.php could help you to do that.

Regards
Ananth Chellathurai
 
reply
    Bookmark Topic Watch Topic
  • New Topic