I am writing a file manager software using struts. I have written the code to upload the file easily using the html:file tag. However when the user has to see the files that have been uploaded, I need to give him the ability to save the uploaded file (name displayed as a link) to disk. How do i do that. Thanks Karthik
As to your question about downloading the files, the general approach is to have a Servlet (Struts Action class in your case) proxy the filesystem for the client. For example, if your upload stores the uploaded files under "/var/data", you'd want your DownloadAction to serve a request to, say "DownloadAction.do?file=sample.txt", by streaming the file "/var/data/sample.txt" to the web browser.