Return-Path: Delivered-To: apmail-struts-user-archive@www.apache.org Received: (qmail 364 invoked from network); 4 May 2009 14:34:42 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.3) by minotaur.apache.org with SMTP; 4 May 2009 14:34:42 -0000 Received: (qmail 38078 invoked by uid 500); 4 May 2009 14:34:39 -0000 Delivered-To: apmail-struts-user-archive@struts.apache.org Received: (qmail 38014 invoked by uid 500); 4 May 2009 14:34:39 -0000 Mailing-List: contact user-help@struts.apache.org; run by ezmlm Precedence: bulk List-Unsubscribe: List-Help: List-Post: List-Id: "Struts Users Mailing List" Reply-To: "Struts Users Mailing List" Delivered-To: mailing list user@struts.apache.org Received: (qmail 38004 invoked by uid 99); 4 May 2009 14:34:39 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 04 May 2009 14:34:39 +0000 X-ASF-Spam-Status: No, hits=2.2 required=10.0 tests=HTML_MESSAGE,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: domain of mgainty@hotmail.com designates 65.55.111.84 as permitted sender) Received: from [65.55.111.84] (HELO blu0-omc2-s9.blu0.hotmail.com) (65.55.111.84) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 04 May 2009 14:34:27 +0000 Received: from BLU142-W28 ([65.55.111.72]) by blu0-omc2-s9.blu0.hotmail.com with Microsoft SMTPSVC(6.0.3790.3959); Mon, 4 May 2009 07:34:06 -0700 Message-ID: Content-Type: multipart/alternative; boundary="_a1f029a6-d7b2-4dda-99d2-451aa7323e56_" X-Originating-IP: [71.192.158.139] From: Martin Gainty To: Struts Users Mailing List Subject: RE: login interceptor and a servlet Date: Mon, 4 May 2009 10:34:06 -0400 Importance: Normal In-Reply-To: <42db7f0a0905032120i9b6ce2fh26fd70309347dc8f@mail.gmail.com> References: <49FE60DB.8060805@anchorintelligence.com> <42db7f0a0905032037y933ccc4ybf71b262ff8f6f34@mail.gmail.com> <49FE64EE.8030306@anchorintelligence.com> <42db7f0a0905032120i9b6ce2fh26fd70309347dc8f@mail.gmail.com> MIME-Version: 1.0 X-OriginalArrivalTime: 04 May 2009 14:34:06.0663 (UTC) FILETIME=[611C2D70:01C9CCC5] X-Virus-Checked: Checked by ClamAV on apache.org --_a1f029a6-d7b2-4dda-99d2-451aa7323e56_ Content-Type: text/plain; charset="Windows-1252" Content-Transfer-Encoding: quoted-printable yes the key is to specify the correct contentType param (in this case image= /jpeg) and the correct contentDisposition (in this case filename) inline can be used for small file transfers (under 4k) image/jpeg imageStream filename=3D"document.pdf" 1024 http://struts.apache.org/2.0.14/struts2-core/apidocs/org/apache/struts2/dis= patcher/StreamResult.html HTH Martin=20 ______________________________________________=20 Disclaimer and Confidentiality/Verzicht und Vertraulichkeitanmerkung / Note= de d=E9ni et de confidentialit=E9=20 This message is confidential. If you should not be the intended receiver=2C= then we ask politely to report. Each unauthorized forwarding or manufactur= ing of a copy is inadmissible. This message serves only for the exchange of= information and has no legal binding effect. Due to the easy manipulation = of emails we cannot take responsibility over the the contents. Diese Nachricht ist vertraulich. Sollten Sie nicht der vorgesehene Empfaeng= er sein=2C so bitten wir hoeflich um eine Mitteilung. Jede unbefugte Weiter= leitung oder Fertigung einer Kopie ist unzulaessig. Diese Nachricht dient l= ediglich dem Austausch von Informationen und entfaltet keine rechtliche Bin= dungswirkung. Aufgrund der leichten Manipulierbarkeit von E-Mails koennen w= ir keine Haftung fuer den Inhalt uebernehmen. Ce message est confidentiel et peut =EAtre privil=E9gi=E9. Si vous n'=EAtes= pas le destinataire pr=E9vu=2C nous te demandons avec bont=E9 que pour sat= isfaire informez l'exp=E9diteur. N'importe quelle diffusion non autoris=E9e= ou la copie de ceci est interdite. Ce message sert =E0 l'information seule= ment et n'aura pas n'importe quel effet l=E9galement obligatoire. =C9tant d= onn=E9 que les email peuvent facilement =EAtre sujets =E0 la manipulation= =2C nous ne pouvons accepter aucune responsabilit=E9 pour le contenu fourni= . > Date: Sun=2C 3 May 2009 21:20:47 -0700 > Subject: Re: login interceptor and a servlet > From: thechrispratt@gmail.com > To: user@struts.apache.org >=20 > Sure=2C you can either implement ServletResponseAware and write directly = to > the stream=2C then return null from execute() to tell struts that there i= s no > additional result required. Or=2C even better=2C you can use the Stream = result > type and let Struts write it to the stream for you. > (*Chris*) >=20 > On Sun=2C May 3=2C 2009 at 8:45 PM=2C Kate Fox wrote: >=20 > > Hi Chris=2C > > > > Thanks for the quick response. Unfortunately my servlet is a true serv= let. > > I need to write directly to the OutputStream. Is there a way to do th= at > > with an image action? > > > > Thanks=2C > > > > Kate > > > > > > Chris Pratt wrote: > > > >> If your image servlet is a true servlet acting outside of struts=2C it= won't > >> be subject to the interceptor stack. If it's actually an image action= =2C > >> just > >> assign it a different interceptor stack that doesn't contain your > >> LoginInterceptor and you'll be good to go. > >> (*Chris*) > >> > >> On Sun=2C May 3=2C 2009 at 8:28 PM=2C Kate Fox >> >wrote: > >> > >> > >> > >>> I have a login interceptor to check login on all my pages. I also ha= ve a > >>> servlet that serves up images. The servlet does not go through the l= ogin > >>> interceptor. Is there a way to force it that way? > >>> > >>> Here is my login interceptor definition: > >>> > >>> > >>> > >>> > >>> > >>> > >>> > >>> > >>> > >>> > >>> > >>> > >>> > >>> Thanks for your help=2C > >>> > >>> Kate > >>> > >>> --------------------------------------------------------------------- > >>> To unsubscribe=2C e-mail: user-unsubscribe@struts.apache.org > >>> For additional commands=2C e-mail: user-help@struts.apache.org > >>> > >>> > >>> > >>> > >> > >> > >> > > > > > > --------------------------------------------------------------------- > > To unsubscribe=2C e-mail: user-unsubscribe@struts.apache.org > > For additional commands=2C e-mail: user-help@struts.apache.org > > > > _________________________________________________________________ Hotmail=AE has ever-growing storage! Don=92t worry about storage limits. http://windowslive.com/Tutorial/Hotmail/Storage?ocid=3DTXT_TAGLM_WL_HM_Tuto= rial_Storage1_052009= --_a1f029a6-d7b2-4dda-99d2-451aa7323e56_--