Win a copy of Programmer's Guide to Java SE 8 Oracle Certified Associate (OCA) this week in the OCAJP forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Sending pdf file to user

 
Prakash Dwivedi
Ranch Hand
Posts: 452
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello,
I have to generate a pdf file in runtime and show dialog box so that user can download it and redirect the page to some jsp.
While i am able to create a pdf file but i am confused how to send it
to the user.I am using struts framework.
I tried useing response.getOutputStream(). but in that case i got some useless characters printed on the browser
Any sugeestions?
thanks
 
Matthew Phillips
Ranch Hand
Posts: 2676
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Try setting your content type to application/pdf.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic