Return-Path: Delivered-To: apmail-myfaces-users-archive@www.apache.org Received: (qmail 39476 invoked from network); 14 Feb 2008 16:36:46 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 14 Feb 2008 16:36:46 -0000 Received: (qmail 66494 invoked by uid 500); 14 Feb 2008 16:36:35 -0000 Delivered-To: apmail-myfaces-users-archive@myfaces.apache.org Received: (qmail 66456 invoked by uid 500); 14 Feb 2008 16:36:35 -0000 Mailing-List: contact users-help@myfaces.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: "MyFaces Discussion" Delivered-To: mailing list users@myfaces.apache.org Received: (qmail 66445 invoked by uid 99); 14 Feb 2008 16:36:34 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 14 Feb 2008 08:36:34 -0800 X-ASF-Spam-Status: No, hits=-0.0 required=10.0 tests=SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of mwessendorf@gmail.com designates 64.233.184.226 as permitted sender) Received: from [64.233.184.226] (HELO wr-out-0506.google.com) (64.233.184.226) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 14 Feb 2008 16:35:59 +0000 Received: by wr-out-0506.google.com with SMTP id c53so737684wra.22 for ; Thu, 14 Feb 2008 08:36:07 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:date:from:sender:to:subject:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references:x-google-sender-auth; bh=418pawUPo7X27eeWwQ8xHYW1ig1+JBLcLIJGhjxW7Do=; b=Rr0UO7+NTBhjZw6Wiby9qBGuhOBmvaUrBPG0CupMgMiVlLyL+5XsFuuXo8JqeiyMaGTwmohx8dKRo/yfWeQ1CTJt311vXMKbTOnf5ncoaEuR88591Zus4Qfdg6+rxrYpcNle7157yjunuWgL0TeW2CDrN11iPMAv7iX/tkb5TM8= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:sender:to:subject:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references:x-google-sender-auth; b=dHFbYoETdN7sg6xaA24AC+xMtt6y46/TgGiSWHvXT+bukiF9Om2iEyNDlMcZxoqSJuV3IHQa6rcJiZbD3nVzUcRtP9I6lNewvv5EmgwpkZ5WvPkA42O7kjwEUE3RZyobgzJ3i5DQB4X8pEs6QHCytCmF8B8e9qiwH3jj7m9THkY= Received: by 10.114.103.1 with SMTP id a1mr1748914wac.59.1203006966460; Thu, 14 Feb 2008 08:36:06 -0800 (PST) Received: by 10.115.54.11 with HTTP; Thu, 14 Feb 2008 08:36:06 -0800 (PST) Message-ID: <71235db40802140836r65a4b9a4lbdea8bc5d39a4011@mail.gmail.com> Date: Thu, 14 Feb 2008 17:36:06 +0100 From: "Matthias Wessendorf" Sender: mwessendorf@gmail.com To: "MyFaces Discussion" Subject: Re: Access Component tree from a Servlet Filter In-Reply-To: MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Content-Disposition: inline References: <1D3D7943573BD14FB024A9654EB43CCB01BF4249@A99A-EMS-01VS2.ad.bedag.ch> <47B4276C.60704@chello.at> <1D3D7943573BD14FB024A9654EB43CCB01BF424B@A99A-EMS-01VS2.ad.bedag.ch> X-Google-Sender-Auth: 05d245baae3d8e92 X-Virus-Checked: Checked by ClamAV on apache.org On Thu, Feb 14, 2008 at 5:20 PM, Andrew Robinson wrote: > Why reinvent the wheel? There are technologies that already do this. +1 on that. -M > > See here for "on-load" functionality: > > http://wiki.apache.org/myfaces/Execute_action_on_page_load?highlight=3D%2= 8onload%29 > > Seam has page security: > > http://docs.jboss.com/seam/2.0.1.GA/reference/en/html/security.html > > ACEGI seems to be pretty popular on the list: > > http://wiki.apache.org/myfaces/JSF_and_Acegi > > -Andrew > > > > On Thu, Feb 14, 2008 at 8:44 AM, Sertic Mirko, Bedag > wrote: > > > Thank you a lot. > > Thats a very good tip. > > > > I am experimenting to implement the following usecase: > > > > Before a given view is displayed, I want to intercept the rendering, ch= eck > if > > Access is allowed. If its allowed, I want to render the response. If no= t, > I want > > to forward the user to a login page. > > > > Currently, I am using a PhaseListener. It is running for the > RENDER_RESPNSE phase. > > Now, now do I implement the tricky part? I know if a user is allowed th= e > view > > a given view, but how do I cancel rendering and forward to another page= ? > > > > Is there any other good solution available for this usecase? > > > > Thanks a lot > > Mirko > > > > > > -----Urspr=FCngliche Nachricht----- > > Von: simon.kitching@chello.at [mailto:simon.kitching@chello.at] > > Gesendet: Donnerstag, 14. Februar 2008 12:35 > > An: MyFaces Discussion > > Betreff: Re: Access Component tree from a Servlet Filter > > > > Sertic Mirko, Bedag schrieb: > > > > > > Hi@all! > > > > > > I need to access the component tree from a sevlet filter, e.g. if the= re > > > > > > is a view to restore. I also need to detect if there is no view to > > > restore, > > > > > > and I need to do that within a ServletFilter. Is this possible, and h= ow > > > > > > should I do that? Are there any examples available? > > > > > > > http://wiki.apache.org/myfaces/AccessFacesContextFromServlet > > > > > > --=20 Matthias Wessendorf further stuff: blog: http://matthiaswessendorf.wordpress.com/ sessions: http://www.slideshare.net/mwessendorf mail: matzew-at-apache-dot-org