• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Download option in JSP

 
Shakti Misra
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
  • 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.
 
David Ulicny
Ranch Hand
Posts: 724
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
There is content type called Content-disposition.
http://www.onjava.com/pub/a/onjava/excerpt/jebp_3/index3.html
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic