Title: Filedownload
Hi,
 
I think the ResourceReader should do what you want.
 
Regards,
Elmar
-----Ursprüngliche Nachricht-----
Von: Kavita Bansal [mailto:[EMAIL PROTECTED]
Gesendet: Freitag, 28. Februar 2003 07:12
An: [EMAIL PROTECTED]
Betreff: Filedownload

Hi

How can I download a file from Web server to the client machine through cocoon.

Thisis the way  to be done in a servlet
response.setContentType("APPLICATION/OCTET-STREAM");
response.setHeader("Content-Disposition","attachment; filename=\""+ filename + "\"");
java.io.FileInputStream fileInputStream =new java.io.FileInputStream(filepath+filename);
int i;
while ((i=fileInputStream.read()) != -1) {
out.write(i);
}
fileInputStream.close();
out.close();

How is this code to be done in cocoon, since the response object in cocoon has no function setContentType(). ????

Thanx

____________________________________________________
            INTIQUA International       
    Intelligent Solutions, Quality Execution
____________________________________________________
 
Note: The information and data contained in this message (and attachments) may be privileged and confidential and protected from disclosure to any party or parties apart from the intended recipient. If the reader of this message is not the intended recipient, or an employee or agent responsible for delivering this message to the intended recipient, you are hereby notified that any dissemination, distribution or copying of this communication is strictly prohibited. If you have received this communication in error, please notify us immediately by replying to the message and deleting it from your computer.


Reply via email to