Win a copy of Think Java: How to Think Like a Computer Scientist this week in the Java in General forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

double submit / how many requests and threads?

 
Tapio Niemela
Ranch Hand
Posts: 77
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

after some googling I could not find satisfactory answer..

What happens when user double submits (double clicks "Submit" or similar) form to servlet? Will/could it create 2 httprequests and 2 threads? Or one httprequest and 2 threads? Or something else?

Please help
 
Paul Clapham
Sheriff
Posts: 21107
32
Eclipse IDE Firefox Browser MySQL Database
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
It's not that complicated. Each time the user clicks on that "Submit" button the browser creates an HTTP request. That's all there is to it.
 
Tapio Niemela
Ranch Hand
Posts: 77
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Paul Clapham wrote:It's not that complicated. Each time the user clicks on that "Submit" button the browser creates an HTTP request. That's all there is to it.


Thanks Paul, so I assume two threads are also created; one for each request
 
Paul Clapham
Sheriff
Posts: 21107
32
Eclipse IDE Firefox Browser MySQL Database
  • Likes 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Of course. The server always uses a separate thread for each request.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic