Forums Register Login

Threads in Servlets

+Pie Number of slices to send: Send
Hi All,

Can any body please let me knw if there is going to be any problem if i create multiple threads in a Servlet,

thanks in advance,
girish
+Pie Number of slices to send: Send
Servlets are already multi threaded.
What are you trying to do?
+Pie Number of slices to send: Send
I have the same doubt. There is a funcionality on my system that is Download of reports.

The thing is that the download files are quite big (about 50 MB) and are created on the fly. Because it can take a while to download the file, I created some methods to show the status of the download. So, to do that, I created a new thread on my servlet, which main and only purpose is to prepare the report file to be downloaded and zip it on the end.

The html client form is refresh from 5-to-5 seconds, so that they can see the progress of the download.

Is this a good aproach?

Thanks
+Pie Number of slices to send: Send
That's how I do it.

I don't create the threads myself because the long running process occurs in the database but the concept is the same.
Every time you till, you lose 30% of your organic matter. But this tiny ad is durable:
a bit of art, as a gift, that will fit in a stocking
https://gardener-gift.com


reply
reply
This thread has been viewed 819 times.
Similar Threads
Daemon Threads
Threads
SCJP Exam
Threads
For those of you who are certified ......
More...

All times above are in ranch (not your local) time.
The current ranch time is
Mar 28, 2024 15:53:12.