Java Mailing List Archive

http://www.junlu.com/

Home » Home (12/2007) » Servlet Interest »

Re: Download on click of a link

Veeren J

2003-11-27


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
              <karthik@(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@(protected)
              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 listserv@(protected)
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 listserv@(protected)
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


©2008 junlu.com - Jax Systems, LLC, U.S.A.