jQuery in Action, 2nd edition*
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 Spring in Action this week in the Spring 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: 61413
    
  67

Please UseCodeTags (⇐ click link)


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

Joined: Jul 29, 2008
Posts: 3164
    
  47

"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();