Win a copy of Cross-Platform Desktop Applications: Using Node, Electron, and NW.js this week in the JavaScript forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

include pdf  RSS feed

 
Mike Yu
Ranch Hand
Posts: 175
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
Can I use jsp:include to include a pdf file?
I tried, but it displayed a lot of garbage code rather than a pdf file.
Thanks,
Mike
 
Balaji Loganathan
author and deputy
Bartender
Posts: 3150
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by Mike Yu:
Hi,
Can I use jsp:include to include a pdf file?
I tried, but it displayed a lot of garbage code rather than a pdf file.
Thanks,
Mike

Its not good idea to include pdf using jsp:include, it won't work, because, your parent jsp browser content type might have been setted to text/html text/xml etc whereas PDF need browser content type to be application/pdf.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!