Return-Path: Delivered-To: apmail-geronimo-dev-archive@www.apache.org Received: (qmail 45336 invoked from network); 22 May 2006 15:03:11 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur.apache.org with SMTP; 22 May 2006 15:03:11 -0000 Received: (qmail 67590 invoked by uid 500); 22 May 2006 15:03:08 -0000 Delivered-To: apmail-geronimo-dev-archive@geronimo.apache.org Received: (qmail 67546 invoked by uid 500); 22 May 2006 15:03:07 -0000 Mailing-List: contact dev-help@geronimo.apache.org; run by ezmlm Precedence: bulk list-help: list-unsubscribe: List-Post: Reply-To: dev@geronimo.apache.org List-Id: Delivered-To: mailing list dev@geronimo.apache.org Received: (qmail 67535 invoked by uid 99); 22 May 2006 15:03:07 -0000 Received: from asf.osuosl.org (HELO asf.osuosl.org) (140.211.166.49) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 22 May 2006 08:03:07 -0700 X-ASF-Spam-Status: No, hits=0.0 required=10.0 tests= X-Spam-Check-By: apache.org Received: from [209.237.227.198] (HELO brutus.apache.org) (209.237.227.198) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 22 May 2006 08:03:07 -0700 Received: from brutus (localhost [127.0.0.1]) by brutus.apache.org (Postfix) with ESMTP id 242F8410006 for ; Mon, 22 May 2006 15:02:30 +0000 (GMT) Message-ID: <26571610.1148310150130.JavaMail.jira@brutus> Date: Mon, 22 May 2006 15:02:30 +0000 (GMT+00:00) From: "Paul McMahan (JIRA)" To: dev@geronimo.apache.org Subject: [jira] Commented: (GERONIMO-1759) getConsoleFrameworkServletPath broken In-Reply-To: <568544454.1143041527452.JavaMail.jira@ajax> 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/GERONIMO-1759?page=comments#action_12412787 ] Paul McMahan commented on GERONIMO-1759: ---------------------------------------- David, Aaron encountered the problem while adding images to the keystore portlet and he put this temporary workaround in place: if(index == -1) { // todo: Hack! But this doesn't always work otherwise if invoked from a page that was invoked from another portlet instead of a page accessed by top-level navigation index = contextPath.indexOf(request.getPathInfo().substring(0, 20)); } The problem with the workaround is that it hard codes the length of the console context and servlet path. The workaround will stop working if/when they change, which may happen via GERONIMO-941. The attached patch uses pattern matching instead of string length to determine the console framework's servlet path. To see the original problem remove the workaround introduced by r388236, namely the lines shown above from PortletManager.java (395-397). Then open the keystore portlet, click on "New Keystore" and then "Cancel". The portlet will no longer display due to java.lang.StringIndexOutOfBoundsException: String index out of range: -1 > getConsoleFrameworkServletPath broken > ------------------------------------- > > Key: GERONIMO-1759 > URL: http://issues.apache.org/jira/browse/GERONIMO-1759 > Project: Geronimo > Type: Bug > Security: public(Regular issues) > Components: console > Versions: 1.0 > Reporter: Aaron Mulder > Assignee: Aaron Mulder > Fix For: 1.1, 1.2 > Attachments: GERONIMO-1759.patch > > This function is used by the portlets to calculate the correct context path to the portal so they can refer to images bundled with the portal WAR (as opposed to bundled with the portlet WAR). > It works fine on pages where you click a navigation link and land there. It does not seem to work if one portlet page has a form that submits to another portlet page and the destination calls the function. > In my case, it was looking for an occurance of: > /Security/Security_keystores/_st_Security_keystores_row1_col1_p1/normal/_rp_Security_keystores_row1_col1_p1_mode/1_list/_ps_Security_keystores_row1_col1_p1/normal/_pm_Security_keystores_row1_col1_p1/view/_pid/Security_keystores_row1_col1_p1/_md_Security_keystores_row1_col1_p1/view > in > /console/portal/Security/Security_keystores/_st_Security_keystores_row1_col1_p1/normal/_ps_Security_keystores_row1_col1_p1/normal/_pm_Security_keystores_row1_col1_p1/view/_pid/Security_keystores_row1_col1_p1/_md_Security_keystores_row1_col1_p1/view > And (if you look carefully) there is clearly none there. -- 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