Hi...
Use this header :
response.setHeader("Content-Disposition", "inline;filename=" +
suggestedFileName);
Gautam
----- Original Message -----
From: Yogesh Agarwal <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Friday, March 10, 2000 7:15 AM
Subject: Save File as suggested filename .. Help ASAP
> Hi all,
>
> I wrote a class that makes a socket connection to an FTP server and gets a
PDF
> file in a ByteArray. Now I want to display the file to the browser. I
wrote a
> servlet which simply writes the byte array to the servlet outputstream.
Now,
> the problem is, when I go to browser's file menu and click save as, the
save
> as dialogbox should display a filename which I should be able to decide,
> rather than displaying the servletname.html .
> I tried using content-disposition header, but I am not actually
downloading
> the file .. I am simply writing it to the servletoutputstream .. bit by
bit.
> I am doing the right thing here??? Can somebody help me out with how
should I
> proceed ... I am stuck !!
>
> I will provide further details if I am not making myself clear enough.
>
> thanx in advance.
>
> Yogesh
>
> ____________________________________________________________________
> Get free email and a permanent address at http://www.netaddress.com/?N=1
>
>
___________________________________________________________________________
> 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