wood burning stoves 2.0*
The moose likes Servlets and the fly likes Please help with response.getoutputStream Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


JavaRanch » Java Forums » Java » Servlets
Bookmark "Please help with response.getoutputStream " Watch "Please help with response.getoutputStream " New topic
Author

Please help with response.getoutputStream

minhdung tran
Greenhorn

Joined: Dec 19, 2007
Posts: 13
    
    1
Good afternoon,
Hope you all have a pleasant afternoon.

For my school project, i would like to return a PDF file from my file system using a servlet's response.getOutputStream method.
It seems to be very straight forward operation, but somehow it does not work. It gave me an unclear message such as "There is a problem with adobe acrobat reader. Please exit and try again (1014:1014) which i don't understand. I have a good copy of acrobat reader and i don't know why it said that i have a problem with it?

Anyway, here is my code and if you see something wrong , please let me know. I am very thankful of all of your help.

Paul Clapham
Bartender

Joined: Oct 14, 2005
Posts: 18570
    
    8

In your Content-Disposition header, you should provide a proper filename for the download. A path isn't a filename. I suggest simply "hello.pdf".
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Please help with response.getoutputStream