This week's giveaway is in the Android forum.
We're giving away four copies of Android Security Essentials Live Lessons and have Godfrey Nolan on-line!
See this thread for details.
The moose likes JSP and the fly likes Displaying bytearray content in iframe Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Java » JSP
Bookmark "Displaying bytearray content in iframe" Watch "Displaying bytearray content in iframe" New topic

Displaying bytearray content in iframe

rachana ravali
Ranch Hand

Joined: Jun 20, 2006
Posts: 32
Hi , I have a requirement where I have to display a pdf in iframe or part of the webpage. Is there any way on displaying the content in bytearray in iframe .I have searched in web, but i can see options where iframe can only display contents from a file located on server. I am getting bytearray from a service. I have to use this byte array and display it in form of pdf in lower half of the webpage.I am using struts. Please advice. Thanks in advance.
Rob Spoor

Joined: Oct 27, 2005
Posts: 19655

JSPs should not be used for displaying binary content. Add just one enter between to JSP tags and that enter goes into the response, breaking the binary data. Servlets on the other hand can write the contents to the response output stream without a problem. You can use one as the source of the iframe.

How To Ask Questions How To Answer Questions
I agree. Here's the link:
subject: Displaying bytearray content in iframe
Similar Threads
Open PDF in new window
Convert PDF into HTML
Issue in Iframe
getting error while displaying PDF from jsp
Open PDF or word doc or text file from byte array data using JSF.