Take the 2-minute tour ×

I am Uploading a file into a webserver using File upload API it works good for a single user, if multiple user upload a file simultaneously how to improve my code using threads?

share|improve this question
Which API are you using? –  Aaron Digulla Oct 30 '09 at 13:44
I am using apache's fileupload API –  Hari Oct 30 '09 at 13:52
Hi Hari, could you please help me with the code to upload a single file to the server! –  manishKungwani Sep 2 '11 at 14:24
Hi Manish, You can easily get the file upload code from the internet. –  Hari Sep 6 '11 at 5:09
add comment

2 Answers

up vote 2 down vote accepted

What type of web server are you using? Typically web servers process separate requests on separate threads, so you shouldn't have to do anything special, your web service code will be inherently multi-threaded.

share|improve this answer
add comment

According to the Servlet API each request is supposed to be processed by a single thread, therefore you shouldn't have any issues.

However if you're trying to maximize the number of users your server could potentially service then you might take a look at advanced connectors for Tomcat or whatever container you are using


share|improve this answer
add comment

Your Answer


