• Post Reply Bookmark Topic Watch Topic
  • New Topic

Multiple Clicks in the same page  RSS feed

 
SaravanaKumar Venugopal
Greenhorn
Posts: 23
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi All,
I am having a scenario/query/doubt on submitting forms.

Consider a user have submitted a form[ BookTicketForm ] in a jsp file call it as BookTickets.jsp, when the request gets passed on to the server then again user hits another form say SearchTicketsForm in the jsp file, now the user will receive reply/response for SearchTicketsForm, but I want to know the status of the request sent on BookTickets, whether it will call be cancelled by the server or what will happen?

Apologize me if am posting this query under wrong topic.

 
Tim Holloway
Bartender
Posts: 18715
71
Android Eclipse IDE Linux
  • Likes 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Well, technically, if you are going to ask about "jsp"s, the JSP forum would be the proper place to ask, but the answer is the same for any web mechanism, regardless of the platform or programming language, regardless of whether it's servlet, JSP, or one of the J2EE frameworks.

Each and every HTTP request/response is asynchronous. In fact, the actual communications are effectively the same as if in a time-share system, you logged in, asked a single question, got a single answer and logged out each time. The illusion of an ongoing conversation is done via session tricks.

To cancel an outbound HTTP request, the client would normally have to interrupt its transmission, and it doesn't normally do that just because you double-clicked something, it just sends 2 separate transmissions.

To cancel an inbound HTTP response, the client could interrupt the returning data stream's connection, but the server has already done its work at that point. More often, the client receives the response, but discards it if another response comes in.

The server never cancels a request/response just because the client sends another one. It really couldn't do so, since any web page containing multiple images, CSS and/or javascript includes and so forth triggers a whole set of parallel requests. And that's more web pages than not.

My browser's default settings allow it to keep 10 request/response threads in play simultaneously. If a page has more than 10 URLs on it, the others queue up, but the browser attempts to keep those threads busy.
 
SaravanaKumar Venugopal
Greenhorn
Posts: 23
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks Tim for your response and it have cleared my doubt.

Just want to know about your browser settings, you mean to say that you have made your browser such that it can also handle the outbound request.

If so, can you please let us know how it has been done.

 
Ivan Jozsef Balazs
Rancher
Posts: 999
5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Besides, it is up to the browser whether it honors (accepts) a second click on a page which has been submitted and a response is being waited for. And if it does, which response does it display.
 
SaravanaKumar Venugopal
Greenhorn
Posts: 23
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks for the clarification.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!