C
cool2005
The problem is users double or trible click at the submit button.
The requirement is we need to ignore all the submission except the
first one.
A "ordinary" way to do this is to set
setSynchronizeOnSession(true);
setSessionForm(true);
in SimpleFormController. This will make the request syn and make trying
to
use the form residing in session.
But the issue is how can I ignore the requests other than the first.
I am new to Spring MVC. In Struts, I can simply return null as the
Forward so that browser recieves none response (or just a header that
doesn't cause
browser to update the screen).
In Spring MVC, it will forward to a blank page if I return null as
ModelAndView.
Two questions:
1). Is there a way in Spring MVC to "cancel" a request.
2). Is there a better way to prevent duplicated submission in my case.
Thanks
mark
The requirement is we need to ignore all the submission except the
first one.
A "ordinary" way to do this is to set
setSynchronizeOnSession(true);
setSessionForm(true);
in SimpleFormController. This will make the request syn and make trying
to
use the form residing in session.
But the issue is how can I ignore the requests other than the first.
I am new to Spring MVC. In Struts, I can simply return null as the
Forward so that browser recieves none response (or just a header that
doesn't cause
browser to update the screen).
In Spring MVC, it will forward to a blank page if I return null as
ModelAndView.
Two questions:
1). Is there a way in Spring MVC to "cancel" a request.
2). Is there a better way to prevent duplicated submission in my case.
Thanks
mark