You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by "Garner, Shawn" <sh...@pearson.com> on 2006/02/01 20:55:33 UTC

[OT] Serving an pdf file in a struts action

Is there any trick in sending the user a pdf by setting the content type to
application/pdf and then using the response.getWriter() to write out the
data?

 

Shawn

 


**************************************************************************** 
This email may contain confidential material. 
If you were not an intended recipient, 
Please notify the sender and delete all copies. 
We may monitor email to and from our network. 
****************************************************************************

Re: [OT] Serving an pdf file in a struts action

Posted by Wendy Smoak <ws...@gmail.com>.
On 2/1/06, Garner, Shawn <sh...@pearson.com> wrote:

> Is there any trick in sending the user a pdf by setting the content type to
> application/pdf and then using the response.getWriter() to write out the
> data?

There is some information on this page:
  http://wiki.apache.org/struts/StrutsFileDownload

And it looks like you've inspired Frank to write another FAQ page, so
you'll probably hear from him shortly. :)

--
Wendy

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org


Re: [OT] Serving an pdf file in a struts action

Posted by "Frank W. Zammetti" <fz...@omnytex.com>.
Are there any tricks?  Hehe, you should ask if there is any NON-TRICKY
way! ;)  Serving PDFs, whether from Struts or not, is notoriously a source
of major angst for many developers.  The Acrobat browser plug-in is a
piece of garbage, IE does things differently than FF, SSL has an effect,
and so on and so forth.  The list of problems is many!

Check this Wiki entry out though:

http://wiki.apache.org/struts/StrutsFileDownload

While it does not address all the various PDF concerns, it does mention
some things that may be helpful.

This strikes me as a good Wiki entry, so I've created one:

http://wiki.apache.org/struts/ServingPdfDocuments

Anyone who wants, please add to this as appropriate.  There's certainly
plenty more to be said on the subject :)

-- 
Frank W. Zammetti
Founder and Chief Software Architect
Omnytex Technologies
http://www.omnytex.com
AIM: fzammetti
Yahoo: fzammetti
MSN: fzammetti@hotmail.com

On Wed, February 1, 2006 2:55 pm, Garner, Shawn said:
> Is there any trick in sending the user a pdf by setting the content type
> to
> application/pdf and then using the response.getWriter() to write out the
> data?
>
>
>
> Shawn
>
>
>
>
> ****************************************************************************
> This email may contain confidential material.
> If you were not an intended recipient,
> Please notify the sender and delete all copies.
> We may monitor email to and from our network.
> ****************************************************************************
>


---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org