2005 1:47 PM
To: user@struts.apache.org
Subject: RE: Specify a file name when using DownloadAction
Vu, Thai asked
> 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
Vu, Thai asked
> 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.
Did you look at
http://wiki.apache.org/struts/StrutsFileDownload#head-188719b6
ction 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
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 earlie
On 12/15/05, Vu, Thai <[EMAIL PROTECTED]> wrote:
> Does anybody know how to specify a file name when we use DownloadAction
> to send a file to users?
This page might help:
http://wiki.apache.org/struts/StrutsFileDownload
--
Wendy
--
5 matches
Mail list logo