[ 
https://issues.apache.org/jira/browse/PB-54?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12462076
 ] 

Matthew Bruzek commented on PB-54:
----------------------------------

For example of the problem one of the resource string is 
"/Graph/theme/graphStyle.css" and the result of getRequestContextPath() is 
"/Graph" so the resulting string that is returned is 
"/Graph/Graph/theme/graphStyle.css" and that resource is not found. 

The method getResourceURL() should not always prepend the context path in this 
case.

> PortletViewHandlerImpl.getResourceURL() always prepends the context path.
> -------------------------------------------------------------------------
>
>                 Key: PB-54
>                 URL: https://issues.apache.org/jira/browse/PB-54
>             Project: Portals Bridges
>          Issue Type: Bug
>          Components: jsf
>    Affects Versions: 1.0
>         Environment: Sun JSF Reference Implementation version 1.2 
> (jsf-impl.jar)
> Websphere portlet container version 6.1.0
> Apache MyFaces JSF portal bridge version 1.0 (portals-bridges-jsf-1.0.jar)
>            Reporter: Matthew Bruzek
>
> When running an application on the MyFaces JSF portal bridge, I noticed the 
> context path is always appended to the URI path in 
> PortletViewHandlerImpl.getResourceURL() even if the path parameter already 
> contains the context path.
> My JSF portal application loads image resources and css files and when using 
> the Sun portal bridge all the resources resolved.  When attempt to use the 
> MyFaces JSF portal bridge, the application failed to find the resources 
> citing a java.io.FileNotFoundException for the resources.  The resources that 
> already contained the context path are prepened with another context path.  
> The getResourceURL() method of PortletViewHandlerImpl ALWAYS prepends the 
> context path to the path parameter without checking if it is already there. 
> I believe changing the getResourceURL() code to delegate this call to the 
> handler.getResourceURL() method of (javax.faces.application.ViewHandler) 
> would resolve the problem.  I made this small change in my sandbox.  The URLs 
> with the context path did not get prepended and the application found all 
> resources.  
> Is there a reason the PortletViewHandlerImpl does not delegate the 
> getResourceURL() method that I am missing?  If there is not a compelling 
> reason not to delegate the call to the included ViewHandler, then perhaps we 
> should delegate the call to javax.faces.application.ViewHandler.  If there is 
> a compelling reason perhaps we should add a check if the context path already 
> exists in the path parameter.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: 
https://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to