• Post Reply Bookmark Topic Watch Topic
  • New Topic

File get currupt if downloaded by response.getOutputStream();  RSS feed

 
Pritish Shirsath
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

Hi,
I am trying to download file (of any type pdf/rar/any etc...) using following code,
but SOME TIME downloaded file is currupted.



but when I use


insted of


It works, & download file by name "MyFile" in bin of tomcat folder.
but not work with response object.
 
Bear Bibeault
Author and ninkuma
Marshal
Posts: 66158
146
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Please UseCodeTags (⇐ click link)
 
Devaka Cooray
Marshal
Posts: 5521
692
Chrome Eclipse IDE Google App Engine IntelliJ IDE jQuery Postgres Database Tomcat Server
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
"Pritish Ss", please check your private messages regarding an important administrative matter.
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!