Java server side file transfer with resume support?

I am trying to allow my java server to transfer a file to which a web browser can load.

However, I want the browser if they paused and resumed file transfers in order to work, rather than starting the download again and again.

Does anyone know java code for the server side to fix this problem?

+4
source share
2 answers

There are two parts to support renewable downloads:

If you are serving a static resource, it is best to use a proxy server, such as Apache, to handle the download. If the proxy server is not a parameter, you can probably find the servlet that is associated with your application server; for example, Tomcat has a DefaultServlet . The disadvantage of this option is that it creates a tight dependency between your application and the application server, which may be unacceptable.

If you decide to tip over, I recommend taking a look at the Apache HTTP components . This is a good API that simplifies working with HTTP requests and responses.

+6
source

David This link will help you get started developing resume file downloads.

http://www.webspheretools.com/sites/webspheretools.nsf/docs/Java%20download%20manager 
+3
source

Source: https://habr.com/ru/post/1339921/


All Articles