Re: Download on click of a link

Veeren J <[email protected]>
Newsgroups gmane.comp.java.sun.servlet
Message-ID <OFD31F3615.5A4E49AD-ON65256DEB.003DB379-65256DEB.003E2586@lntinfotech.com>
Hi Karthik,
try setting the response header like this.


response.setHeader("Content-Disposition","attachment;filename=ReadMe.pdf");

if u set it to exe then i guess it would start executing it on a click.

Not sure since this is not tested.

Thanks & Regards
Veerendra Jote
-----------------------------------------------------------------------------------

Be careful of your thoughts; they may become words at any moment.
Experience is a wonderful thing. It enables you to recognize a mistake when
you make it again.



                      Karthikeyan
                      <[email protected]        To:       [email protected]
                      T.NET>                      cc:
                      Sent by: "A mailing         Subject:  Download on click of a link
                      list for discussion
                      about Sun
                      Microsystem's Java
                      Servlet API
                      Technology."
                      <SERVLET-INTEREST@JA
                      VA.SUN.COM>


                      11/27/2003 04:39 PM
                      Please respond to
                      karthik






Hi.,


I hava a problem.


I have a link in my page. On click of it, it is showing a dialog that asks
for Save As or Run. I need to avoid that and want the downloadable to
install directly on click of the link.


Thanks.


Karthik.S



___________________________________________________________________________
To unsubscribe, send email to [email protected] and include in the body
of the message "signoff SERVLET-INTEREST".


Archives: http://archives.java.sun.com/archives/servlet-interest.html
Resources: http://java.sun.com/products/servlet/external-resources.html
LISTSERV Help: http://www.lsoft.com/manuals/user/user.html

___________________________________________________________________________
To unsubscribe, send email to [email protected] and include in the body
of the message "signoff SERVLET-INTEREST".

Archives: http://archives.java.sun.com/archives/servlet-interest.html
Resources: http://java.sun.com/products/servlet/external-resources.html
LISTSERV Help: http://www.lsoft.com/manuals/user/user.html
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.