On Wed, 13 Oct 2004 13:12:23 -0400, Moynihan, Edward
<[EMAIL PROTECTED]> wrote:
> Hi,
>    Can anyone point me in the right direction with the following problem that I am 
> experiencing.
> 
>    I've written a very simple action that streams back to the client an attachment.  
> So, here is a code snippet from the action to illustrate what I am doing.  Assume 
> that the URL to hit the action is /testDownloadAction.do and I am using https 
> instead of http.
> 
>             response.setContentType("application/octet-stream");
>             response.setHeader("Pragma", "no-cache");
>             response.setHeader("Expires", "-1");
> 
>             buf = new StringBuffer();
>             
> buf.append("attachment;filename=").append("TextDownloadByOctectStreamWithoutForward.txt");
>             response.setHeader("Content-Disposition", buf.toString());
>

I don't have reason to believe that StringBuffer is working here, but
just in case have you tried something like:

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

or perhaps you are just missing some escaped quotes around your filename? 

 
>             writer = response.getWriter();
>             writer.write("Sending down some text.  This is a text download without a 
> forward");
>             writer.flush();
>             writer.close();
> 
>             actionForward = null;
> 
> When I use FireFox, I get a FileDownload dialog and I am allowed to save the file of 
> name "TextDownloadByOctectStreamWithoutForward.txt".
> However, when I use IE 6.0 the FileDialog pops up and says that the file name is 
> "testDownloadAction.do".  If I try to hit Save, IE comes back with an error.
> 
> Does anyone have any resources to help me understand why this is not working in IE?
> 
> Thanks.
> 
> -Ed.
> 
> ---------------------------------------------------------------------
> 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