Re: Struts - How to Download a File

2004-05-04 Thread Martin Cooper
Just set the appropriate HTTP response headers, write the content to the servlet output stream, and then return 'null' from your Struts Action. -- Martin Cooper "Singh_bibek" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] Hi All, We wish to provide a link to the user, clicking on wh

RE: Struts - How to Download a File

2004-05-04 Thread Lee, Yau-Pang
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.toStri