Win a copy of Kotlin in Action this week in the Kotlin forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Displaying bytearray content in iframe  RSS feed

 
rachana ravali
Ranch Hand
Posts: 32
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Sheriff
Posts: 21092
85
Chrome Eclipse IDE Java Windows
  • Likes 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!