Not really struts here, more of a http question.

In your servlet you can response to the client with something like this:

response.setContentType("application/mpg");
response.setHeader("Content-disposition", "attachment; filename=" + fileName);

out = response.getWriter();
out.write(output.toString());

where output is your file....

-----Original Message-----
From: Singh_bibek [mailto:[EMAIL PROTECTED]
Sent: Tuesday, May 04, 2004 12:58 AM
To: [EMAIL PROTECTED]
Subject: Struts - How to Download a File


Hi All,
We wish to provide a link to the user, clicking on which user can download the 
file(jpg,gif,mpg,wav,tiff) to his/her local disk.

The user should be therefore prompted for the path where the file is to be saved.

Can anyone guide me as to how to achieve the same using Struts.

Thanks,

Regards,
Bibek


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