I am trying to show PDF file from JSF. For that I wanted to open new window and show display through servlet (Not through JSF) but I could not open new window from JSF (You can see thread windows.open()). I would like to give response back in same page through using response.getOutPutStream() but here after this JSF is trying to give response back also and I am getting response is already commited error. If somehow I am able to config in faces-config that
so JSF will not response back and I dont get any Error.
Thanks in Advance Sajan Patel [ August 24, 2005: Message edited by: Sajan Patel ]
Thanks for reply I would like to use more and more JSF but as I am using JSF first time and I am not sure how could I do that in JSF. I am useing iText to generate PDF (fyi: This is not PDF Form. It is just simple PDF document for printing purpose).
If I want to response back with PDF I have to get hold on response.getOutPutStream() and stream out whole PDF in outputtream.
Hi, I faced the same problem so I am posting a reply on top of the message. I am openning a pop up and passing a parameter. Everything is working fine but "Response already commited" and Strict servlet api--(some exception) is thrown in the console. Can you help me out please
Joined: Oct 25, 2004
Actually I am not sure what is happeing in JSF but when we are using INLINE than our document will open in same window and at that time we are having reponse commited error. But if we use ATTACHMENT than our document will open in another window (with associate application e.g. acrobat reader) and we will not have response commited error.
try with this
[ January 05, 2006: Message edited by: Sajan Patel ] [ January 05, 2006: Message edited by: Sajan Patel ]
Hi, This is henry.Iam trying to print a pdf document from a jsf page.There is a PRINT command button in my screen.When i click the print button a pdf will be generated and stored in the filesystem.The generated pdf has to be printed automatically without opening the document.Just the printdialog has to be opened and the user can say print.The problem here is,there is one action event(Print button) which will generate the pdf and opens the printdialog for printing the generated pdf.Iam struckup with getting the generated pdf in my jsf and printing it.can u help me on these?