This week's book giveaway is in the OCAJP 8 forum. We're giving away four copies of OCA Java SE 8 Programmer I Study Guide and have Edward Finegan & Robert Liguori on-line! See this thread for details.
Hi all, I recently posted about uploading files to the server from the client, now, I guess I techinically want to download files to the client.
The consultants on a big project basically want to be able to do this, and I am investigating how possible this would be. We are using Struts and Weblogic 8.1. I think it is probably impossible, but I don't want to sound too negative, and figured I don't really know everything, so should investigate.
We have an application, where users can import items to the database, and also export things from the database, to XML files.
Up until today, we had to make the users import and export things to and from files on the server. I have now managed to allow them to import files from their client, but have not sussed how to allow them to export files to their machine, without having to make them hit the mouse and select save as.
This is an acceptable solution if there is no other way, it is just that if we save tons of files to the server, then allow the user to save as, the server will eventually have lots of files on it that are not meant to be there.
The user inputs the file name, so I was wondering if there was anyway of downloading information to the file name submitted without save as?
Thanks. I didn't think it was possible (for the security reasons), but I just had to check, since the user is responsible for typing in the file name, or providing the file name I thought it just MIGHT be possible. But you have confirmed what I already thought, and I just wanted to make sure, before telling everyone it was impossible, and then finding out it was possible.
Hi I think u can do it by adding all the contents first in the stringbuffer and store it on the server and give the path of that text file to the hyperlink download but this solution has a drawback that every time there we are making ,whether the client download the page or not. you can solve it if u save the text in the stringbuffer to the disk only when the client click the download link