The user of my application must click on links to view PDF
files.
I have this problem. PDF file paths are referenced in a remote database
. To get the files the idea I came up with is to make a publisher
Web Service application, where the remote database is hosted.
So when the client clicks on a link, the WS method is called and the publisher gets the physical file from the corresponding folder over there.
As I also have a bandwidth issue, I would like to compress the file on the remote server and download it on my server. Since my superiors asked that the file should be shown directly in the browser, I must unzip the file and show it to the client.
After some research I can see that we can download both the PDF and zipped file. Both don't fit my requirement as the first one would affect bandwidth and the second one will give a zipped output.
I plan to implement my WS in REST
. Could I have some guidelines please?
http://www.mkyong.com/webservices/jax-rs/download-text-file-from-jax-rs/ file downloading in restful web services