aspose file tools*
The moose likes JSP and the fly likes How to do this? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » JSP
Bookmark "How to do this?" Watch "How to do this?" New topic
Author

How to do this?

Chetan Parekh
Ranch Hand

Joined: Sep 16, 2004
Posts: 3636
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?


My blood is tested +ve for Java.
Adeel Ansari
Ranch Hand

Joined: Aug 15, 2004
Posts: 2874
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 ]
Stefan Evans
Bartender

Joined: Jul 06, 2005
Posts: 1018
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.
Vishnu Prakash
Ranch Hand

Joined: Nov 15, 2004
Posts: 1026
Check out this link

Double Submit Problem


Servlet Spec 2.4/ Jsp Spec 2.0/ JSTL Spec 1.1 - JSTL Tag Documentation
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: How to do this?