• 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

file download

 
Ranch Hand
Posts: 110
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I am developing a file download jsp page. But i am facing problem while
supporting download for different mime types. I have some confusions :
1) When i write file with "application/octet-stream", netscape shows
the save dialog box,and save it as a .exe.jsp file. but we can rename it to the actual type and it works fine. so how to instruct netscape to save the file as "application".
(2) If i write the file with "text/plain" mime type, browser opens the
file, but i want it to save the file, instead of opening it.
3) How can i set the file name in the save dialog of the browser?
thanks in advance
 
Ranch Hand
Posts: 299
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Take a look at JspBrowser:
http://www.vonloesch.de/jspbrowser.html
It's a free, open-source JSP file browser/downloader. The code inside it is messy (to say the least), but it might have the answer for you. I'm actually working right now on cleaning it up and making the code "prettier" (and adding real MP3 support)
brian
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
reply
    Bookmark Topic Watch Topic
  • New Topic