You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@geronimo.apache.org by "Aaron Mulder (JIRA)" <de...@geronimo.apache.org> on 2006/03/22 16:32:07 UTC

[jira] Created: (GERONIMO-1759) getConsoleFrameworkServletPath broken

getConsoleFrameworkServletPath broken
-------------------------------------

         Key: GERONIMO-1759
         URL: http://issues.apache.org/jira/browse/GERONIMO-1759
     Project: Geronimo
        Type: Bug
  Components: console  
    Versions: 1.0    
    Reporter: Aaron Mulder
     Fix For: 1.1, 1.2


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


[jira] Assigned: (GERONIMO-1759) getConsoleFrameworkServletPath broken

Posted by "David Jencks (JIRA)" <de...@geronimo.apache.org>.
     [ http://issues.apache.org/jira/browse/GERONIMO-1759?page=all ]

David Jencks reassigned GERONIMO-1759:
--------------------------------------

    Assign To: Aaron Mulder  (was: Paul McMahan)

I can't see where the problem is pre-patch, could aaron or Paul provide better instructions for seeing the defect this fixes?  (or aaron just apply the patch)

> 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


[jira] Updated: (GERONIMO-1759) getConsoleFrameworkServletPath broken

Posted by "Paul McMahan (JIRA)" <de...@geronimo.apache.org>.
     [ http://issues.apache.org/jira/browse/GERONIMO-1759?page=all ]

Paul McMahan updated GERONIMO-1759:
-----------------------------------

    Patch Info: [Patch Available]

> getConsoleFrameworkServletPath broken
> -------------------------------------
>
>          Key: GERONIMO-1759
>          URL: http://issues.apache.org/jira/browse/GERONIMO-1759
>      Project: Geronimo
>         Type: Bug
>   Components: console
>     Versions: 1.0
>     Reporter: Aaron Mulder
>     Assignee: Paul McMahan
>      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


[jira] Assigned: (GERONIMO-1759) getConsoleFrameworkServletPath broken

Posted by "Paul McMahan (JIRA)" <de...@geronimo.apache.org>.
     [ http://issues.apache.org/jira/browse/GERONIMO-1759?page=all ]

Paul McMahan reassigned GERONIMO-1759:
--------------------------------------

    Assign To: Paul McMahan

> getConsoleFrameworkServletPath broken
> -------------------------------------
>
>          Key: GERONIMO-1759
>          URL: http://issues.apache.org/jira/browse/GERONIMO-1759
>      Project: Geronimo
>         Type: Bug
>   Components: console
>     Versions: 1.0
>     Reporter: Aaron Mulder
>     Assignee: Paul McMahan
>      Fix For: 1.1, 1.2

>
> 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


[jira] Commented: (GERONIMO-1759) getConsoleFrameworkServletPath broken

Posted by "Paul McMahan (JIRA)" <de...@geronimo.apache.org>.
    [ 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


[jira] Updated: (GERONIMO-1759) getConsoleFrameworkServletPath broken

Posted by "Paul McMahan (JIRA)" <de...@geronimo.apache.org>.
     [ http://issues.apache.org/jira/browse/GERONIMO-1759?page=all ]

Paul McMahan updated GERONIMO-1759:
-----------------------------------

    Attachment: GERONIMO-1759.patch

The attached patch will determine the console framework servlet path as follows:

-  get the path info for the portlet from the portlet request
-  get the portlet name by splitting the path info on '/'
-  create a renderURL from the portlet response
-  truncate the renderURL at the first occurrence of the portlet name

> getConsoleFrameworkServletPath broken
> -------------------------------------
>
>          Key: GERONIMO-1759
>          URL: http://issues.apache.org/jira/browse/GERONIMO-1759
>      Project: Geronimo
>         Type: Bug
>   Components: console
>     Versions: 1.0
>     Reporter: Aaron Mulder
>     Assignee: Paul McMahan
>      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


[jira] Commented: (GERONIMO-1759) getConsoleFrameworkServletPath broken

Posted by "Aaron Mulder (JIRA)" <de...@geronimo.apache.org>.
    [ http://issues.apache.org/jira/browse/GERONIMO-1759?page=comments#action_12412790 ] 

Aaron Mulder commented on GERONIMO-1759:
----------------------------------------

In truth, the number 20 was completely arbitrary.  The two strings are enormous,
and 20 seemed like enough to assume similarity (main category and subcategory)
without going far enough to the right to risk running into the minor differences.

> 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


[jira] Closed: (GERONIMO-1759) getConsoleFrameworkServletPath broken

Posted by "David Jencks (JIRA)" <de...@geronimo.apache.org>.
     [ http://issues.apache.org/jira/browse/GERONIMO-1759?page=all ]
     
David Jencks closed GERONIMO-1759:
----------------------------------

    Fix Version:     (was: 1.2)
     Resolution: Fixed

AFAICT the patch fixes the problem.  Add keystore still doesn't work, but due to a different problem that I understand Aaron is working on.  Applied in rev 408813.

> 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
>  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