Answers to other questions indicated that the SourceForge download page worked by adding a hidden <iframe>. This is not so ...
How is the current version of the download page implemented? I would like to build something like this because I find the SF solution quite elegant.
Well, more precisely ... True, the original "question" was too vague.
If you go to http://sourceforge.net/projects/beankeeper/files/beankeeper/2.6.2/beankeeper-2.6.2.tar.gz/download , there is a simple old HTML link to download the file, but there is also automatic download. The delay appears to be about 2 seconds.
Someone asked for my specific use case. I will answer this, knowing that he can be distracted from the OP to a certain extent. Very simplified:
- more or less traditional Java EE application with two servlets
- Servlet Manager, which acts as an entry point for the user interface controller.
- the "servlet" that transfers the PDF to the browser, it does this using content-disposition = attachment ie the browser displays a save or open dialog
- print a page with several input fields and a submit button
- when you click submit
- the values of the input field should be updated in the user interface model (and, if necessary, the session) → what the servlet manager does
- need to create a pdf file -> what the Servlet document does
SF, , Servlet ( ). - , SF ? - Servlet.