you have to setContentType to application/x-download
then set the Content Dispostion to attachment
// 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

Verdad?
M-
----- Original Message ----- From: <[EMAIL PROTECTED]>
To: <user@struts.apache.org>
Sent: Thursday, November 17, 2005 6:44 AM
Subject: Donwload files


Hi,

I have a appli lets download a file. My problem is what dialog box show as
file name 'anything.do' instead real file name.
I remenber to read something about this, but I don't now know where....

Anyboy can remenber it?



---------------------------------------------------------------------
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