File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
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

How to do this?

Chetan Parekh
Ranch Hand

Joined: Sep 16, 2004
Posts: 3640
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
(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.
[ November 21, 2005: Message edited by: Adeel Ansari ]
Stefan Evans

Joined: Jul 06, 2005
Posts: 1580
Another possibility would be to use the synchronizer token pattern.

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:
subject: How to do this?
It's not a secret anymore!