You are viewing a plain text version of this content. The canonical link for it is here.
Posted to pluto-dev@portals.apache.org by "David Hay (JIRA)" <ji...@apache.org> on 2007/01/24 20:51:49 UTC

[jira] Created: (PLUTO-288) PortletRequestImpl.getContextPath() returns wrong value for root context

PortletRequestImpl.getContextPath() returns wrong value for root context
------------------------------------------------------------------------

                 Key: PLUTO-288
                 URL: https://issues.apache.org/jira/browse/PLUTO-288
             Project: Pluto
          Issue Type: Bug
          Components: portlet container
    Affects Versions: 1.1.0-beta2
            Reporter: David Hay


The javadoc for HttpServletRequest states that 'For servlets in the default (root) context, this method returns ""'.  However PortletRequestImpl is returning the context path from the portletwindowimpl without checking for '/'.  getContextPath should check for "/" as the context path and return "" in that case.

This particular problem causes problems with the c:url tag in JSTL.  Referencing a resource with this tag will result in a double slash in the url, which can sometimes cause problems.  That is  <c:url value="/my/url" />  will result in the value "http://host//my/url" when the web application is in the root context.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Resolved: (PLUTO-288) PortletRequestImpl.getContextPath() returns wrong value for root context

Posted by "David DeWolf (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/PLUTO-288?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

David DeWolf resolved PLUTO-288.
--------------------------------

    Resolution: Fixed

Thanks!!!! SVN Commit 503316.

> PortletRequestImpl.getContextPath() returns wrong value for root context
> ------------------------------------------------------------------------
>
>                 Key: PLUTO-288
>                 URL: https://issues.apache.org/jira/browse/PLUTO-288
>             Project: Pluto
>          Issue Type: Bug
>          Components: portlet container
>    Affects Versions: 1.1.0-beta2
>            Reporter: David Hay
>         Assigned To: David DeWolf
>
> The javadoc for HttpServletRequest states that 'For servlets in the default (root) context, this method returns ""'.  However PortletRequestImpl is returning the context path from the portletwindowimpl without checking for '/'.  getContextPath should check for "/" as the context path and return "" in that case.
> This particular problem causes problems with the c:url tag in JSTL.  Referencing a resource with this tag will result in a double slash in the url, which can sometimes cause problems.  That is  <c:url value="/my/url" />  will result in the value "http://host//my/url" when the web application is in the root context.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (PLUTO-288) PortletRequestImpl.getContextPath() returns wrong value for root context

Posted by "David Hay (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/PLUTO-288?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12467126 ] 

David Hay commented on PLUTO-288:
---------------------------------

getContextPath should probably look like this:

public String getContextPath() {
        String contextPath = this.internalPortletWindow.getContextPath();
        if ("/".equals(contextPath)) {
            contextPath = "";
        }
        return contextPath;
}


> PortletRequestImpl.getContextPath() returns wrong value for root context
> ------------------------------------------------------------------------
>
>                 Key: PLUTO-288
>                 URL: https://issues.apache.org/jira/browse/PLUTO-288
>             Project: Pluto
>          Issue Type: Bug
>          Components: portlet container
>    Affects Versions: 1.1.0-beta2
>            Reporter: David Hay
>
> The javadoc for HttpServletRequest states that 'For servlets in the default (root) context, this method returns ""'.  However PortletRequestImpl is returning the context path from the portletwindowimpl without checking for '/'.  getContextPath should check for "/" as the context path and return "" in that case.
> This particular problem causes problems with the c:url tag in JSTL.  Referencing a resource with this tag will result in a double slash in the url, which can sometimes cause problems.  That is  <c:url value="/my/url" />  will result in the value "http://host//my/url" when the web application is in the root context.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Assigned: (PLUTO-288) PortletRequestImpl.getContextPath() returns wrong value for root context

Posted by "David DeWolf (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/PLUTO-288?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

David DeWolf reassigned PLUTO-288:
----------------------------------

    Assignee: David DeWolf

> PortletRequestImpl.getContextPath() returns wrong value for root context
> ------------------------------------------------------------------------
>
>                 Key: PLUTO-288
>                 URL: https://issues.apache.org/jira/browse/PLUTO-288
>             Project: Pluto
>          Issue Type: Bug
>          Components: portlet container
>    Affects Versions: 1.1.0-beta2
>            Reporter: David Hay
>         Assigned To: David DeWolf
>
> The javadoc for HttpServletRequest states that 'For servlets in the default (root) context, this method returns ""'.  However PortletRequestImpl is returning the context path from the portletwindowimpl without checking for '/'.  getContextPath should check for "/" as the context path and return "" in that case.
> This particular problem causes problems with the c:url tag in JSTL.  Referencing a resource with this tag will result in a double slash in the url, which can sometimes cause problems.  That is  <c:url value="/my/url" />  will result in the value "http://host//my/url" when the web application is in the root context.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (PLUTO-288) PortletRequestImpl.getContextPath() returns wrong value for root context

Posted by "David DeWolf (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/PLUTO-288?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

David DeWolf updated PLUTO-288:
-------------------------------

    Fix Version/s: 1.1.0

> PortletRequestImpl.getContextPath() returns wrong value for root context
> ------------------------------------------------------------------------
>
>                 Key: PLUTO-288
>                 URL: https://issues.apache.org/jira/browse/PLUTO-288
>             Project: Pluto
>          Issue Type: Bug
>          Components: portlet container
>    Affects Versions: 1.1.0-beta2
>            Reporter: David Hay
>         Assigned To: David DeWolf
>             Fix For: 1.1.0
>
>
> The javadoc for HttpServletRequest states that 'For servlets in the default (root) context, this method returns ""'.  However PortletRequestImpl is returning the context path from the portletwindowimpl without checking for '/'.  getContextPath should check for "/" as the context path and return "" in that case.
> This particular problem causes problems with the c:url tag in JSTL.  Referencing a resource with this tag will result in a double slash in the url, which can sometimes cause problems.  That is  <c:url value="/my/url" />  will result in the value "http://host//my/url" when the web application is in the root context.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.