0

I am working on a project in which I have to create a pdf file at run time and save it in webapp directory and than I have to display it in next view (xhtml). So How do I access webapp through url to display the file in next view. I have deployed the application to tomcat7 container.

String pdfFilePath = generatePDFFile(path.concat("/1.pdf"));

This is the code to display the pdf in .xhtml file

<embed src="path" width="718" height="700"/>

what should be the path in both locations to access the file?

Bilal Shah
  • 1,135
  • 7
  • 17
  • 42
  • @BalusC I have gone through this link but this is not what I want to do.I want to first save and than I want to display the pdf in browser. – Bilal Shah Apr 14 '16 at 21:29
  • The link explains how to do that. If you actually want to permanently save PDF, then head to http://stackoverflow.com/q/18664579 (which is also linked in "See also" of the duplicate). – BalusC Apr 14 '16 at 21:31

0 Answers0