Hi,
The archive of this list has very many messages on how this can be achieved.
One possible solution is this.
If you presently call the download servlet as
http://www.myserver.com/mycontext/myserveletmapping?fileId = 1
call it as
http://www.myserver.com/mycontext/myserveletmapping/filename?fileId = 1
Note the addtions of filename in the url.
For more details on other ways to achieve this, Pls check the archives at
http://archives.java.sun.com/archives/servlet-interest.html
Regds,
Gokul
----- Original Message -----
From: "Harvinder Singh" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Thursday, May 17, 2001 2:40 PM
Subject: [SERVLET-INTEREST] file name with applicatin/x-download content
type
> Hi,
> I am setting content type as "application/x-download" in my servlet to
force
> the contents to be saved in a file on the client side. When popup comes
with
> options, do u want to save it or open it, servlet name comes as the
default
> file name to be saved. Can i give some other name to the file to be saved
on
> the client side.
>
> PS: Servlet name is "DownloadFIle.java". Pop up comes with option, do you
> wanna save the file and the default name displayed on the popup window is
> "DownloadFIle" . How can I change it to sth else?
>
> Thanks in advance.
>
> Regards,
> Harvinder
>
> -----
>
>
___________________________________________________________________________
> 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