• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Is any way We can tell JSF to not response

 
Ranch Hand
Posts: 77
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Dear All,

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 ]
 
Ranch Hand
Posts: 15304
6
Mac OS X IntelliJ IDE Chrome
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I am curious as to why you are trying to mix JSF with Servlets. Why don't you just deliver the PDF using JSF? Or is this some service you are trying to attach to?
 
Sajan Patel
Ranch Hand
Posts: 77
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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.

please Let me know how if I can do that in JSF.

Thanks
Sajan Patel
 
Gregg Bolinger
Ranch Hand
Posts: 15304
6
Mac OS X IntelliJ IDE Chrome
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Maybe try something like this:



Just call this method using method binding on either a commandButton or commandLink.
 
Sajan Patel
Ranch Hand
Posts: 77
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
thanks buddy I dont know why your code is working and below my code was not working



fyi: I have used action in commandLink.

Again Thanks

Sajan Patel
[ August 24, 2005: Message edited by: Sajan Patel ]
 
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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
 
Sajan Patel
Ranch Hand
Posts: 77
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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 ]
 
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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?

you can reach me at henry.joseph@gmail.com

Thanks
henry
 
reply
    Bookmark Topic Watch Topic
  • New Topic