Return-Path: Delivered-To: apmail-jakarta-struts-dev-archive@apache.org Received: (qmail 58902 invoked from network); 23 Jul 2003 06:54:44 -0000 Received: from exchange.sun.com (192.18.33.10) by daedalus.apache.org with SMTP; 23 Jul 2003 06:54:44 -0000 Received: (qmail 21555 invoked by uid 97); 23 Jul 2003 06:57:28 -0000 Delivered-To: qmlist-jakarta-archive-struts-dev@nagoya.betaversion.org Received: (qmail 21548 invoked from network); 23 Jul 2003 06:57:28 -0000 Received: from daedalus.apache.org (HELO apache.org) (208.185.179.12) by nagoya.betaversion.org with SMTP; 23 Jul 2003 06:57:28 -0000 Received: (qmail 58286 invoked by uid 500); 23 Jul 2003 06:54:38 -0000 Mailing-List: contact struts-dev-help@jakarta.apache.org; run by ezmlm Precedence: bulk List-Unsubscribe: List-Subscribe: List-Help: List-Post: List-Id: "Struts Developers List" Reply-To: "Struts Developers List" Delivered-To: mailing list struts-dev@jakarta.apache.org Received: (qmail 58267 invoked from network); 23 Jul 2003 06:54:38 -0000 Received: from fepz.post.tele.dk (195.41.46.133) by daedalus.apache.org with SMTP; 23 Jul 2003 06:54:38 -0000 Received: from localhost.localdomain ([195.41.46.247]) by fepZ.post.tele.dk (InterMail vM.5.01.06.01 201-253-122-130-101-20030228) with ESMTP id <20030723065448.IXKC15352.fepZ.post.tele.dk@localhost.localdomain> for ; Wed, 23 Jul 2003 08:54:48 +0200 From: =?iso-8859-1?q?Kent=20S=F8lvsten=20Rasmussen?= To: Struts Developers List Subject: Re: Streaming PDF file with the bean:write tag -- please help Date: Wed, 23 Jul 2003 08:54:48 +0200 MIME-Version: 1.0 References: X-Mailer: TDC Online webmail (version aarhus/1.0.17) X-Originating-IP: 193.162.202.231 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=iso-8859-1 Message-Id: <20030723065448.IXKC15352.fepZ.post.tele.dk@localhost.localdomain> X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N This is a Struts User question, so please post it in the Users List. I just wonder why you want to use a jsp for this. Normally I would use a se= rvlet for binary content. leonard_reinstein@bankone.com wrote: >=20 > I would like to be able to display/stream the PDF file in > the browser and > use the tag in the JSP to acomplish that. > Say I have a form bean that has a byte array field, and I > want the jsp to > specify the contentType as "application/pdf" and just have > the bean:write > tag, such as: >=20 > >=20 > Is this possible to achieve? Are there any hacks/tricks to > make it work in > a JSP when the form bean has the binary content field? >=20 > When I do it with with the byte array attribute, it just > displays the > address of the array in memory (possibly calls toString()). > If I make the > field of type String and convert the byte array to String in > the > controller as follows: str =3D new String(byteArray), it does > not get > converted correctly and the browser hangs. >=20 > I know the best way to do it is to have a servlet. But I > need to do it in > a JSP because of certain limitations of my application. > Please help. >=20 > Thanks. >=20 >=20 >=20 > This transmission may contain information that is > privileged, confidential and/or exempt from disclosure under > applicable law. If you are not the intended recipient, you > are hereby notified that any disclosure, copying, > distribution, or use of the information contained herein > (including any reliance thereon) is STRICTLY PROHIBITED. If > you received this transmission in error, please immediately > contact the sender and destroy the material in its entirety, > whether in electronic or hard copy format. Thank you. >=20 >=20 > ------------------------------------------------------------ > --------- > To unsubscribe, e-mail: > struts-dev-unsubscribe@jakarta.apache.org > For additional commands, e-mail: > struts-dev-help@jakarta.apache.org >=20 --------------------------------------------------------------------- To unsubscribe, e-mail: struts-dev-unsubscribe@jakarta.apache.org For additional commands, e-mail: struts-dev-help@jakarta.apache.org