Link to home
Start Free TrialLog in
Avatar of rahulkothari
rahulkothari

asked on

Opening a PDF file from a Servlet

I have a PDF file which I want to render to my client.

Once the request come how can read the file from underlying O/S like c:/temp/a.pdf and then render him back ...

Thanx in advance,

RK
ASKER CERTIFIED SOLUTION
Avatar of CEHJ
CEHJ
Flag of United Kingdom of Great Britain and Northern Ireland image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of rahulkothari
rahulkothari

ASKER

how about using HttpClient ... let know your views ...

RK
Is the client a browser? If it isn't, you're going to have to find either something to plug in to your gui, or run something like Adobe to view it
(HttpClient is non-gui software)
You can use Runtime.exec() to invoke a PDF viewer. Try command something like:

cmd /c start c:\temp\a.pdf
:-)