Hi All,

I have a image in a frame, I want to save the file by dynamically assigning
it a name.Any ideas? or help is appreciated.

Bye
Srikanth

-----Original Message-----
From: Joakim Olsson [mailto:[EMAIL PROTECTED]]
Sent: Thursday, November 30, 2000 2:39 AM
To: [EMAIL PROTECTED]
Subject: Re: Send a file back for saving and give it a name??


Hi,

you can use

response.setHeader("Content-Disposition", "attachment;
filename=\"MyFile.txt\"")

Regards
Joakim


> -----Original Message-----
> From: A mailing list about Java Server Pages specification and reference
> [mailto:[EMAIL PROTECTED]]On Behalf Of Duffey, Kevin
> Sent: den 30 november 2000 04:37
> To: [EMAIL PROTECTED]
> Subject: [JSP-INTEREST] Send a file back for saving and give it a name??
>
>
> Hi there,
>
> We have on our site the ability for users to select a document id and it
> will return a file for them to save (and later reuse). The document is
> created dynamically in memory on the server, and we set the contentType to
> application which DOES pop up the "Save As" dialog box on the clients
> machine. They can save the text file. The problem is, the filename that is
> in the dialog is the path used to call the servlet. In our case, we are
> using an MVC framework with .do mapped to a controller servlet. We have a
> /download.do and every time..no matter what file we send back, the dialog
> that pops up saves it as dialog.do. Is there any way at all to change the
> name of the file that appears in the dialog box?
>
> Thank you very much.
>
> ==================================================================
> =========
> To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff
> JSP-INTEREST".
> For digest: mailto [EMAIL PROTECTED] with body: "set
> JSP-INTEREST DIGEST".
> Some relevant FAQs on JSP/Servlets can be found at:
>
>  http://java.sun.com/products/jsp/faq.html
>  http://www.esperanto.org.nz/jsp/jspfaq.html
>  http://www.jguru.com/jguru/faq/faqpage.jsp?name=JSP
>  http://www.jguru.com/jguru/faq/faqpage.jsp?name=Servlets
>
>

===========================================================================
To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff
JSP-INTEREST".
For digest: mailto [EMAIL PROTECTED] with body: "set JSP-INTEREST
DIGEST".
Some relevant FAQs on JSP/Servlets can be found at:

 http://java.sun.com/products/jsp/faq.html
 http://www.esperanto.org.nz/jsp/jspfaq.html
 http://www.jguru.com/jguru/faq/faqpage.jsp?name=JSP
 http://www.jguru.com/jguru/faq/faqpage.jsp?name=Servlets

===========================================================================
To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff
JSP-INTEREST".
For digest: mailto [EMAIL PROTECTED] with body: "set JSP-INTEREST
DIGEST".
Some relevant FAQs on JSP/Servlets can be found at:

 http://java.sun.com/products/jsp/faq.html
 http://www.esperanto.org.nz/jsp/jspfaq.html
 http://www.jguru.com/jguru/faq/faqpage.jsp?name=JSP
 http://www.jguru.com/jguru/faq/faqpage.jsp?name=Servlets

===========================================================================
To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST".
For digest: mailto [EMAIL PROTECTED] with body: "set JSP-INTEREST DIGEST".
Some relevant FAQs on JSP/Servlets can be found at:

 http://java.sun.com/products/jsp/faq.html
 http://www.esperanto.org.nz/jsp/jspfaq.html
 http://www.jguru.com/jguru/faq/faqpage.jsp?name=JSP
 http://www.jguru.com/jguru/faq/faqpage.jsp?name=Servlets

Reply via email to