When user clicks on some link, I'm entering a java code of the ManagedBean processAction method in which I'm copying a file to a network drive, and than I want to open this file on the Client side, for example the file to be opened is a .pdf file.
I tried something but all I managed to do is to open the file on the server side, each time the user clicked on the link
p.s the important part is that the file is must be opened from the processAction method (java code)
Thanks ahead. [ December 10, 2008: Message edited by: Daniel Reznick ]
I think the best way is to let the browser handle the download of the file. For example, if you click on a powerpoint file on the web, the browser automatically opens the file with the appropriate executable (MS Power point, open office or some other power point reader).
Depending on your application server, you can configure your HTTP server to let clients download files automatically (you don't actually need to write code to do this). The user simply clicks on the link and the file is automatically downloaded or opened for them and this action is handled by their browser.