• 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

Download option in JSP

 
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi All
I am facing a problem in downloading option in a JSP page. My jsp page display list of files(any extension) with hyperlink.now clicking on the hyperlink, a download dialog box should be displayed(Save,Open).
I had used <a href="/a.zip" target="_blank">a.zip</a>. But it's work with all types of file except .txt,.bmp,.html(those file are recognised by browser).

Can any one suggest me whenever i click on any file link , it should display Save,Open dialog box not to display the contents of the file on the browser window.
 
Ranch Hand
Posts: 724
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
There is content type called Content-disposition.
http://www.onjava.com/pub/a/onjava/excerpt/jebp_3/index3.html
reply
    Bookmark Topic Watch Topic
  • New Topic