Win a copy of Murach's Python Programming this week in the Jython/Python forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Please help with response.getoutputStream  RSS feed

 
minhdung tran
Greenhorn
Posts: 13
1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Sheriff
Posts: 22185
38
Eclipse IDE Firefox Browser MySQL Database
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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".
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!