• 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
  • Ron McLeod
  • Tim Cooke
  • Liutauras Vilda
  • Jeanne Boyarsky
Sheriffs:
  • Paul Clapham
  • Rob Spoor
  • Junilu Lacar
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Piet Souris
  • Carey Brown
Bartenders:

How to do this?

 
Ranch Hand
Posts: 3640
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
We have an application developed as per MVC architecture using JSP, Servlet and JavaBeans.

I have a single controller that handle request from user.

Now I want to implemented logic that detect
(1)Refresh
(2)Back
(3)Multiple Submit

How to do this?
 
Ranch Hand
Posts: 2874
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Requesting for the page and refresh has no distinction at the server.

Back button mostly function from browser proxy, if not then it is also the same as sending a request.

Yeah, but for multiple submit, like if user press a button multiple times, there is a way to control that.
http://www.onjava.com/pub/a/onjava/2003/04/02/multiple_submits.html
[ November 21, 2005: Message edited by: Adeel Ansari ]
 
Bartender
Posts: 1845
10
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Another possibility would be to use the synchronizer token pattern.
http://www.javaworld.com/javaworld/javatips/jw-javatip136.html

Basically you issue a "token identifier" to each page, so you can detect duplicate submissions/refreshes.
 
Ranch Hand
Posts: 1026
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Check out this link

Double Submit Problem
 
reply
    Bookmark Topic Watch Topic
  • New Topic