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 Servlets and the fly likes Sending pdf file to user 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 » Servlets
Bookmark "Sending pdf file to user" Watch "Sending pdf file to user" New topic
Author

Sending pdf file to user

Prakash Dwivedi
Ranch Hand

Joined: Sep 28, 2002
Posts: 452
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


Prakash Dwivedi (SCJP2, SCWCD, SCBCD)
"Failure is not when you fall down, Its only when you don't get up again"
Matthew Phillips
Ranch Hand

Joined: Mar 09, 2001
Posts: 2676
Try setting your content type to application/pdf.


Matthew Phillips
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
 
subject: Sending pdf file to user
 
Similar Threads
Printing Report in Struts2
Response as PDF
Saving a PDF automatically
Using Thumbnail PDFs
iReport Question