Thanks so much for your answer. May I ask you to clarify what you said
(because I haven't understood much yet)?

I looked at these examples
(http://wiki.apache.org/struts/StrutsFileDownload) on using
DownloadAction and saw nothing like your code :( So I wonder if you
could post your whole Action file here.

Sincerely,

Thai

-----Original Message-----
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] 
Sent: Friday, December 16, 2005 1:17 AM
To: Struts Users Mailing List
Cc: Struts Users Mailing List
Subject: Re: Specify a file name when using DownloadAction


Hi,

      You can try with this, for me work fine

// Set the headers.
res.setContentType("application/x-download");
res.setHeader("Content-Disposition", "attachment; filename=" +
filename);

// Send the file.
OutputStream out = res.getOutputStream(  );
returnFile(filename, out);  // Shown earlier in the chapter






 

                      "Vu, Thai"

                      <[EMAIL PROTECTED]        To:       "Struts Users
Mailing List" <user@struts.apache.org>                            
                      com>                     cc:

                                               bcc:

                      15/12/2005 19:56         Subject:  Specify a file
name when using DownloadAction                                   
                      Please respond to

                      "Struts Users

                      Mailing List"

 

 

 

 

 





Does anybody know how to specify a file name when we use DownloadAction
to send a file to users?

Sincerely,

Thai


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]







---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to