Return-Path: Delivered-To: apmail-beehive-dev-archive@www.apache.org Received: (qmail 4896 invoked from network); 10 Jan 2006 20:32:15 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur.apache.org with SMTP; 10 Jan 2006 20:32:15 -0000 Received: (qmail 20966 invoked by uid 500); 10 Jan 2006 20:31:47 -0000 Delivered-To: apmail-beehive-dev-archive@beehive.apache.org Received: (qmail 20890 invoked by uid 500); 10 Jan 2006 20:31:45 -0000 Mailing-List: contact dev-help@beehive.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: "Beehive Developers" Delivered-To: mailing list dev@beehive.apache.org Received: (qmail 20723 invoked by uid 99); 10 Jan 2006 20:31:43 -0000 X-ASF-Spam-Status: No, hits=1.3 required=10.0 tests=SPF_FAIL X-Spam-Check-By: apache.org Received: from [192.87.106.226] (HELO ajax.apache.org) (192.87.106.226) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 10 Jan 2006 12:31:42 -0800 Received: from ajax.apache.org (ajax.apache.org [127.0.0.1]) by ajax.apache.org (Postfix) with ESMTP id 812E521F for ; Tue, 10 Jan 2006 21:31:21 +0100 (CET) Message-ID: <2144429655.1136925081527.JavaMail.jira@ajax.apache.org> Date: Tue, 10 Jan 2006 21:31:21 +0100 (CET) From: "Carlin Rogers (JIRA)" To: dev@beehive.apache.org Subject: [jira] Resolved: (BEEHIVE-1037) The PageFlowRequestProcessor.processMapping() is not handling a default "unknown" action defined in the GlobalApp In-Reply-To: <1913045204.1136856920263.JavaMail.jira@ajax.apache.org> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-Virus-Checked: Checked by ClamAV on apache.org X-Spam-Rating: minotaur.apache.org 1.6.2 0/1000/N [ http://issues.apache.org/jira/browse/BEEHIVE-1037?page=all ] Carlin Rogers resolved BEEHIVE-1037: ------------------------------------ Resolution: Fixed Assign To: Alejandro Ramirez (was: Carlin Rogers) Fixed with revision 367778. The test case for the repro that is attached to this issue can be used to test this fix. With the fix, the link on the bogus action should successfully go to the GlobalApp's /noMatch action defined as "unknown". This forwards to strutsMerge/test1/done.jsp. > The PageFlowRequestProcessor.processMapping() is not handling a default "unknown" action defined in the GlobalApp > ----------------------------------------------------------------------------------------------------------------- > > Key: BEEHIVE-1037 > URL: http://issues.apache.org/jira/browse/BEEHIVE-1037 > Project: Beehive > Type: Bug > Components: NetUI > Versions: 1.1 > Reporter: Carlin Rogers > Assignee: Alejandro Ramirez > Fix For: 1.1 > Attachments: j1037-repro.zip > > It seems that with svn revision 351812 (for http://issues.apache.org/jira/browse/BEEHIVE-1017 ) and svn revision 356056 (for http://issues.apache.org/jira/browse/BEEHIVE-1024 ), the behavior of PageFlowRequestProcessor.processMapping() has changed. > The scenario that I'm investigating is for a portal that uses PageFlowUtils.strutsLookup(). > - A (deprecated) Global.app is included in the NetUI web app. > - The Global.app has a struts merge with a struts module config file. > - The struts module config file includes an action that has the "unknown" attribute (a sort of default action). > - The "unknown" action in the merged struts module config file is actually an action implemented in the Global.app. > Then a portlet renders a page flow that has a page with a link to a bogus action. Prior to the two revisions above, when the request is made to the bogus action, processMapping() calls doForward() to the Global.app URI and returns a null map. Then, strutsLookup() checks that a redirect did not occur and tries recursive strutsLookup() on the return URI (the global.app). In this second pass to processMapping() we find the action that is defined by the "unknown" attribute that is then called to handle the bogus action. > Now, with the revisions above, there are two things I've noticed. > 1) First, when the initial page flow with the bogus action is rendered, the module config of the Global.app is not added to the servlet context as it was in the past. With svn revision 351812, the FlowController.reinitialize() method (called during a create()) no longer calls the initModuleConfig() method and in turn ensures that the Struts module for the given path is registered as an attribute of the servlet context. When processMapping() gets the bogus action, the check to see if a global app module config even exists fails. The call to InternalUtils.getModuleConfig() for the GlobalApp module config will be null. We will fail and fall into a call to processUnresolvedAction(). > 2) Even if the Global.app module config was available from the context, I think there is still a second issue. In svn revision 356056, processMapping() now checks that there is a module config for the Global.app and checks that it has the desired action before falling into processUnresolvedAction(). However, we don't check to see if Global.app has a default "unknown" action to handle a bogus action. > I will try to attach a MockPortal app to repro this. As pointed out to me, some sort of API testing might be a better bet to catch something like this. Something to do for next rev of NetUI. -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira