We are doing it this way using T5's StreamResponse: return new StreamResponse() { public String getContentType() { return pdf.getContentType(); } public InputStream getStream() { return pdf.getPdfStream(); } public void prepareResponse(Response response) { response.setHeader("Content-Disposition", "attachment; filename=fpca.pdf"); } };
The "pdf" variable is of our own class, but the only missing thing is the content type, which we set as "application/pdf". mrg On Fri, Mar 26, 2010 at 10:24 AM, Everton Agner <everton_ag...@yahoo.com.br> wrote: > Hi, > > I need to return a PDF file as response of a ActionLink request... How can I > do that? Can I return a Resource or a File in the "onActionFromXXXX()" method > and T5 takes care of the Response header configuration? > > Thanks! > > > > > ____________________________________________________________________________________ > Veja quais são os assuntos do momento no Yahoo! +Buscados > http://br.maisbuscados.yahoo.com --------------------------------------------------------------------- To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org