Puh, thats a difficult problem.
From the servlet container’s point of view
your “double” click just look like two normal
requests. The first request is processed (i.e.
the document is commited) and the follow up page
is sent to the client. However, this page is
discarded since the second request is processed
… and results in an error since the document
has already been commited.
As far as I know, static html pages have the
same behavior: if you click on a second
(different) link, the second request overrides
the first.
This problem is basically the same with every
link - not just commit. But the behavior will
be slightly different.
What could we change on the server side to
improve the situation? Discard requests
if the previous request is still processed?
(Currently, we just queue up requests.)
This could be possible, the respective code is
in jsp.ServletSessionContext.findSessionContext.
But I don’t what to send to the client (i.e.
your browser) in this situation. Something to
make him forget the response and use the response
of the previous request instead. I don’ know.
Maybe something else. Do you know JavaScript?
I don’t, but it could be possible to intercept
the “click” by a JavaScript script, disable the
link first and then send the request.
Yes, I think that’s the path you should try.
Is there anybody who knows JavaScipt?
Michael
PS: Just changing the error message is possible as
well, but there are quite a few messages you had
to change since there are many “double” clicks
to produce a problem.
Software AG Germany, Darmstadt
#API-Management#Tamino#webMethods