wood burning stoves
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
JavaRanch » Java Forums » Java » Servlets
Bookmark "Sending pdf file to user" Watch "Sending pdf file to user" New topic

Sending pdf file to user

Prakash Dwivedi
Ranch Hand

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

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
I agree. Here's the link: http://aspose.com/file-tools
subject: Sending pdf file to user
It's not a secret anymore!