• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Trying to download File

 
Ranch Hand
Posts: 104
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi,

I am trying to download a file stored in Database(in a blob).I am just reading it and writing output to outputstream.


I am setting contenttype to "application/ms-word","application/vnd.ms-excel" depending upon the file extension. I am also setting the response header as ""Content-Disposition"," inline; filename=" + FileName

all this together is working perfectly on my xp based laptop. as soon as I moved it to my linux based server,It has stopped functioning. The pop-up for file open/save is not coming.The servlet just shows a blank page,no error at all. I don't know how to fix and what to do..

Thanks in advance, and sorry for the lengthy post...
Vrunda
 
Vrunda Joshi
Ranch Hand
Posts: 104
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi,
Problem Fixed!!! I checked the other topics related to "File Download" and changed my response header from
"Content-Disposition"," inline; filename=" + FileName
to
"Content-Disposition"," attachment; filename=" + strFileName

and it's working now

I wish I had done this before posting reply...
thanks anyways,
Vrunda
 
Sheriff
Posts: 13411
Firefox Browser VI Editor Redhat
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thank you for posting back with your solution.
Now this thread can someone else using the search tool.
 
Don't get me started about those stupid light bulbs.
reply
    Bookmark Topic Watch Topic
  • New Topic