This week's book giveaway is in the OCAJP 8 forum.
We're giving away four copies of OCA Java SE 8 Programmer I Study Guide and have Edward Finegan & Robert Liguori on-line!
See this thread for details.
The moose likes Servlets and the fly likes File get currupt if downloaded by response.getOutputStream(); Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of OCA Java SE 8 Programmer I Study Guide this week in the OCAJP 8 forum!
JavaRanch » Java Forums » Java » Servlets
Bookmark "File get currupt if downloaded by response.getOutputStream();" Watch "File get currupt if downloaded by response.getOutputStream();" New topic
Author

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

Pritish Shirsath
Greenhorn

Joined: Apr 06, 2010
Posts: 1

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

Joined: Jan 10, 2002
Posts: 63353
    
  70

Please UseCodeTags (⇐ click link)


[Asking smart questions] [Bear's FrontMan] [About Bear] [Books by Bear]
Devaka Cooray
ExamLab Creator
Sheriff

Joined: Jul 29, 2008
Posts: 3713
    
  89

"Pritish Ss", please check your private messages regarding an important administrative matter.


Author of ExamLab ExamLab - a free SCJP / OCPJP exam simulator
What would SCJP exam questions look like? -- Home -- Twitter -- How to Ask a Question
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: File get currupt if downloaded by response.getOutputStream();
 
It's not a secret anymore!