commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Martin Cooper" <mart...@apache.org>
Subject Re: FileUpload question regarding file downloading
Date Sat, 26 Apr 2003 04:20:42 GMT

"Juozas Baliuka" <baliuka@mwm.lt> wrote in message
news:026801c30b3a$6261ef60$a901a8c0@juozas...
>
> response.setContentType(type);
> response.setHeader("Content-Disposition", "attachment; filename="+
> fileName );
> response.getOutputStream().write(bytes);

And then, in a Struts Action:

    return null;

which tells Struts that you've already dealt with the response, and Struts
need take no further action.

--
Martin Cooper


>
> Is it you are asking about ?
>
> ----- Original Message -----
> From: "Ross Allard" <Ross.Allard@sas.com>
> To: <commons-dev@jakarta.apache.org>
> Sent: Friday, April 25, 2003 2:52 PM
> Subject: FileUpload question regarding file downloading
>
>
> This is probably a basic question, but once I've gotten a file to the
> mid-tier (and beyond), how do I deliver it back to a user when requested?
I
> have a struts web application that needs to handle attachments.  I can use
> fileupload to get the file from the client into a repository.  What's the
> process of delivering it back to the user for viewing, in such a way that
> the browser has enough information to know what to do?  I'm hoping that I
> don't have to cache the file on the mid-tier...
>
> Any help will be appreciated.
>
> Ross Allard
> Sas Institute
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: commons-dev-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: commons-dev-help@jakarta.apache.org




---------------------------------------------------------------------
To unsubscribe, e-mail: commons-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-dev-help@jakarta.apache.org


Mime
View raw message