commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Juozas Baliuka" <bali...@mwm.lt>
Subject Re: FileUpload question regarding file downloading
Date Fri, 25 Apr 2003 14:53:07 GMT

response.setContentType(type);
response.setHeader("Content-Disposition", "attachment; filename="+
fileName );
response.getOutputStream().write(bytes);

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