Skip to main content

Display PDF in JSF page

Please note these java.net forums are being decommissioned and use the new and improved forums at https://community.oracle.com/community/java.
3 replies [Last post]
hezjing
Offline
Joined: 2007-05-25

Hi
I have a managed bean which will generate a report in PDF based on the user input, but then how do I display this PDF in a JSF page?
Is it true that I have to implement my own servlet for this?
Appreciate if you can also show me some articles related to this, thank you!

Reply viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
rogerk
Offline
Joined: 2004-05-06
hezjing
Offline
Joined: 2007-05-25

Thank you, rogerk!
I have tried the example and it works for my case, except that I want to display the PDF in my current browser window instead of popup a new one.
Do you have any idea of how to do this?

mistry
Offline
Joined: 2014-04-01

firstly thanks for providing the information.
I need to display the pdf in the same jsf page.
Can anyone help me on this?