I am creating a web application where I would be downloading word (.doc) file from database. What my client wan't is once I click the "Open File A" button/ link, it should download word file automatically (at some path) and get it open in MS Word. My client don't want users to download the file and double click on it and open.
Can we do it?
For web application, below are the technologies I am using.
- Glassfish server
- JSF 2.0
I believe, in web application, we can't have access over client machine so we can't open the file using MS Word. What we can achieve is download the file at path provided by user. Please suggest me if I am wrong.
Any idea would be greatly appreciated.
Note: Using Java, I tried using Desktop class, however this would run on webserver which is not client machine, so it won't help me.
In simple way, I have a button called "Open File A" on web-browser. When I click on it, it should do below steps.
- Download that file from DB (say abc.doc).
- Open this file in Microsoft Office Word (By Browser and not by person)
I am able to do first part, concern is second part.