Granny's Programming Pearls
"inside of every large program is a small program struggling to get out"
JavaRanch.com/granny.jsp
The moose likes Servlets and the fly likes double submit / how many requests and threads? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Servlets
Bookmark "double submit / how many requests and threads?" Watch "double submit / how many requests and threads?" New topic
Author

double submit / how many requests and threads?

Tapio Niemela
Ranch Hand

Joined: Jan 06, 2006
Posts: 77
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
Bartender

Joined: Oct 14, 2005
Posts: 18541
    
    8

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

Joined: Jan 06, 2006
Posts: 77
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
Bartender

Joined: Oct 14, 2005
Posts: 18541
    
    8

Of course. The server always uses a separate thread for each request.
 
wood burning stoves
 
subject: double submit / how many requests and threads?