Return-Path: Delivered-To: apmail-incubator-beehive-user-archive@www.apache.org Received: (qmail 50601 invoked from network); 3 Mar 2005 23:22:54 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur-2.apache.org with SMTP; 3 Mar 2005 23:22:54 -0000 Received: (qmail 43712 invoked by uid 500); 3 Mar 2005 23:22:52 -0000 Delivered-To: apmail-incubator-beehive-user-archive@incubator.apache.org Received: (qmail 43694 invoked by uid 500); 3 Mar 2005 23:22:52 -0000 Mailing-List: contact beehive-user-help@incubator.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: "Beehive Users" Delivered-To: mailing list beehive-user@incubator.apache.org Received: (qmail 43681 invoked by uid 99); 3 Mar 2005 23:22:52 -0000 X-ASF-Spam-Status: No, hits=0.0 required=10.0 tests= X-Spam-Check-By: apache.org Received-SPF: pass (hermes.apache.org: local policy) Received: from palrel12.hp.com (HELO palrel12.hp.com) (156.153.255.237) by apache.org (qpsmtpd/0.28) with ESMTP; Thu, 03 Mar 2005 15:22:47 -0800 Received: from cacexg12.americas.cpqcorp.net (cacexg12.americas.cpqcorp.net [16.92.1.72]) by palrel12.hp.com (Postfix) with ESMTP id 7D5E043613E for ; Thu, 3 Mar 2005 15:22:45 -0800 (PST) Received: from cacexc03.americas.cpqcorp.net ([16.92.1.27]) by cacexg12.americas.cpqcorp.net with Microsoft SMTPSVC(6.0.3790.211); Thu, 3 Mar 2005 15:22:45 -0800 X-MimeOLE: Produced By Microsoft Exchange V6.5.7226.0 Content-class: urn:content-classes:message MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Subject: RE: How to use ActionInterceptor.afterNestedIntercept() Date: Thu, 3 Mar 2005 15:22:44 -0800 Message-ID: <4DEF16167D0B3A4889E4C5940F9E5B1C047ECE48@cacexc03.americas.cpqcorp.net> X-MS-Has-Attach: X-MS-TNEF-Correlator: Thread-Topic: How to use ActionInterceptor.afterNestedIntercept() Thread-Index: AcUgQvYFgrdxL4n7Saa+LsAhDrkenAAA7DxQ From: "Yee, Sunny K" To: "Beehive Users" X-OriginalArrivalTime: 03 Mar 2005 23:22:45.0412 (UTC) FILETIME=[E7D3EE40:01C52047] X-Virus-Checked: Checked X-Spam-Rating: minotaur-2.apache.org 1.6.2 0/1000/N Hi Richard, It works, and I don't see the warnings either with your files. I didn't know about the 'returnAction' and 'nestedDone' usage. Does the 'nestedDone' string have special meaning? @Jpf.Controller( nested=3Dtrue, simpleActions=3D{ @Jpf.SimpleAction(name=3D"begin", path=3D"index.jsp"), @Jpf.SimpleAction(name=3D"done", returnAction=3D"nestedDone") } ) Thanks, Sunny -----Original Message----- From: Richard Feit [mailto:richard.feit@bea.com]=20 Sent: Thursday, March 03, 2005 2:47 PM To: Beehive Users Subject: Re: How to use ActionInterceptor.afterNestedIntercept() Hi Sunny, Sorry for the late reply -- I'm away with spotty internet access. Comments/questions inline. Yee, Sunny K wrote: >Hi Richard, > >I tried testing with your files, but I still don't see the >afterNestedIntercept() method being called. I used >/interceptedMe/begin.do and /interceptedMe/another.do URLs. > >My console output when I use the /interceptedMe/another.do URL: > >... >in preAction() in test.MyTestInterceptor >02 Mar 2005 16:49:48,624 WARN ActionInterceptorContext []: Dropping=20 >non-serializable request attribute bundle=20 >({_defaultValidationMessages=3Dorg.apache.beehive.netui.script.common.Bu= n >d >leContext$StrutsBundleNode@c38157}). >02 Mar 2005 16:49:48,624 WARN ActionInterceptorContext []: Dropping=20 >non-serializable request attribute _netui:servletContext=20 >(org.apache.catalina.core.ApplicationContextFacade@1609c13). >(nothing after this) > >Are the warnings an issue? > > =20 > This shouldn't be a problem, although I need to look into why this is happening (or what to do about it to get rid of the warnings). >>The /nested page flow can be any nested page flow that returns through >> =20 >> >a returnAction. > >My nested page flow selects a 'begin' action where it forwards to a=20 >'index.jsp'. Do I have to do anything special, e.g. calling a page=20 >flow method, in my 'begin' action. > > =20 > Just to make sure, when you're in your nested page flow, are you hitting an action that returns a Forward like this one: @Jpf.Forward(name=3D"exit", returnAction=3D"nestedDone") ? >Is it also true that if an action matches more than one of the=20 >configured interceptors, e.g. I setup a pageflow interceptor and a=20 >interceptor for an action, then only one interceptor gets invoked. The >more general interceptor is selected to run; in my ex, the pageflow=20 >interceptor. > > =20 > That's actually a bug on my part -- all of the appropriate interceptors should be run. If that's not happening for you, would you mind filing a bug on me (http://issues.apache.org/jira/browse/BEEHIVE )? I'm going to send you a zip of my app -- would you confirm that it works on your end (i.e., that afterNestedIntercept() is called)? That might help clear up any variables. Rich >Thanks, >Sunny > >-----Original Message----- >From: Richard Feit [mailto:richard.feit@bea.com] >Sent: Wednesday, March 02, 2005 1:01 PM >To: Beehive Users >Subject: Re: How to use ActionInterceptor.afterNestedIntercept() > >Last try at attachments -- including most of the relevant files as text: > /interceptMe/Controller.jpf > /interceptMe/index.jsp > /WEB-INF/src/test/MyInterceptor.java > /WEB-INF/netui-config.xml > >The /nested page flow can be any nested page flow that returns through=20 >a returnAction. > > >Richard Feit wrote: > > =20 > >>Hi Sunny, >> >>Basically, afterNestedIntercept() works in the following situation: >> - Your ActionInterceptor is invoked on a request for an action, and >> - in preAction it calls setOverrideForward() with an=20 >>InterceptorForward that points to a nested page flow (i.e., it=20 >>"injects" a nested page flow before the desired action). >> >>Your afterNestedIntercept() is called when the nested page flow is=20 >>done -- when one of its actions forwards to a 'returnAction' (let me=20 >>know if you need more info on that). It's invoked *before* you=20 >>actually get to the original desired action, and if you want you can=20 >>even change the destination by calling setOverrideForward(). >> >>You're right -- you configure action interceptors in netui-config.xml. >>You can do it globally (every action), per-pageflow, or per-action. =20 >>Here's a simple per-pageflow example: >> >> >> /interceptMe/Controller.jpf >> >> >> =20 >> >test.MyInterceptor > =20 > >> >> >> >> >>I'm going to try to attach a full example in a subsequent email, but=20 >>if it bounces on the list, I'll send it directly to you. >> >>Rich >> >> >>Yee, Sunny K wrote: >> >> =20 >> >>>I'm trying to understand the ActionInterceptor functionality, and >>> =20 >>> >can't > =20 > >>>get the afterNestedIntercept() method for my ActionInterceptor class >>> =20 >>> >to > =20 > >>>be invoked. =20 >>>Is it a configuration in /WEB-INF/netui-config.xml that will make >>> =20 >>> >that > =20 > >>>happen? An example would be helpful. >>> >>>I'm using the Beta code downloaded from the svn source repository. >>> >>>Thanks for any help. >>> >>> >>> =20 >>> > > =20 >