This is not only a bad idea, but it will not work either. Here's why: your file upload request will end up in a method doPost(). While you are in this method, the container keeps the connection open. As soon as you return from this method (and if you decide to process the incoming data in a separate stream, it doPost()will end earlier), the container assumes that you are done with the request and close the connection. From the point of view of the client, the download was interrupted by the server. And due to the asynchronous nature of the threads, interruption will occur at a random moment.
Believe me, some users have already experienced this: HttpServletResponse seems to periodically send prematurely .
, , ( ). , , - Servlet 3.0 , . : startAsync ?.