Re: PDF Streamed To Client

2005-04-27 Thread Andre Van Klaveren
> -Original Message- > From: Andre Van Klaveren [mailto:[EMAIL PROTECTED] > Sent: Tuesday, April 26, 2005 4:51 PM > To: Struts Users Mailing List; Nick Heudecker > Subject: Re: PDF Streamed To Client > > Brian, > > While Nick's solution certainly works, it

RE: PDF Streamed To Client

2005-04-27 Thread Brian McGovern
be one of those cases where in practice its a better idea to stray from stringent mvc pattern. But I'm just a hack. :) -B -Original Message- From: Andre Van Klaveren [mailto:[EMAIL PROTECTED] Sent: Tuesday, April 26, 2005 4:51 PM To: Struts Users Mailing List; Nick Heudecker Subject:

Re: PDF Streamed To Client

2005-04-26 Thread Andre Van Klaveren
Brian, While Nick's solution certainly works, it doesn't follow best practices, MVC in particular (No offense Nick). Technically a view component such as a Servlet or JSP should be responsible for writing the response back to the client. The Action is responsible for flow control and interacting

Re: PDF Streamed To Client

2005-04-26 Thread Nick Heudecker
> Follow Up: This works but im having a little trouble outputting the content > type appropriately. > > -B > > -Original Message- > From: Nick Heudecker [mailto:[EMAIL PROTECTED] > Sent: Tuesday, April 26, 2005 1:47 PM > To: Struts Users Mailing List > Subje

RE: PDF Streamed To Client

2005-04-26 Thread Brian McGovern
Nevermind. Dumb question. I got it. -Original Message- From: Brian McGovern [mailto:[EMAIL PROTECTED] Sent: Tuesday, April 26, 2005 4:01 PM To: Struts Users Mailing List; Nick Heudecker Subject: RE: PDF Streamed To Client Follow Up: This works but im having a little trouble

RE: PDF Streamed To Client

2005-04-26 Thread Brian McGovern
Follow Up: This works but im having a little trouble outputting the content type appropriately. -B -Original Message- From: Nick Heudecker [mailto:[EMAIL PROTECTED] Sent: Tuesday, April 26, 2005 1:47 PM To: Struts Users Mailing List Subject: Re: PDF Streamed To Client Brian: This is

RE: PDF Streamed To Client

2005-04-26 Thread Brian McGovern
ruts Users Mailing List Subject: Re: PDF Streamed To Client I have successfully used the following technique for file download via an action: Set the mimetype in the web.xml Do nothing action always returns 'success' points to tiles def for file to be downloaded action-map:

Re: PDF Streamed To Client

2005-04-26 Thread Jeff_Caswell
I have successfully used the following technique for file download via an action: Set the mimetype in the web.xml Do nothing action always returns 'success' points to tiles def for file to be downloaded action-map: tiles-def: -Jeff I'm wondering if anyone has any tips on how to

Re: PDF Streamed To Client

2005-04-26 Thread Niall Pemberton
Or use the new DownloadAction - it is in the Struts 1.2.6 beta version, Details on the wiki http://wiki.apache.org/struts/StrutsFileDownload http://svn.apache.org/dist/struts/v1.2.6/ Niall - Original Message - From: "Nick Heudecker" <[EMAIL PROTECTED]> Sent: Tuesday, April 26, 2005 6:4

RE: PDF Streamed To Client

2005-04-26 Thread Brian McGovern
great.. its the return null part i was missing.. thanks.! -Original Message- From: Nick Heudecker [mailto:[EMAIL PROTECTED] Sent: Tuesday, April 26, 2005 1:47 PM To: Struts Users Mailing List Subject: Re: PDF Streamed To Client Brian: This is pretty simple. Just get the output stream

Re: PDF Streamed To Client

2005-04-26 Thread Nick Heudecker
Brian: This is pretty simple. Just get the output stream from the response object and stream the file down. Return null from the Action's execute method: private void returnFile(File f, OutputStream out) throws IOException { FileInputStream fis = null; try { fis