[ 
https://issues.apache.org/jira/browse/PORTLETBRIDGE-217?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13060087#comment-13060087
 ] 

Alexandr Smirnov commented on PORTLETBRIDGE-217:
------------------------------------------------

I uploaded the latest patch for released TCK version ( 
http://svn.apache.org/repos/asf/myfaces/portlet-bridge/tck/tags/jsr329-1.0.0 ), 
which contains fixes:
1) Prepends urls for ExternalContext#encodeActionURL and 
ExternalContext#encodeResourceUrl with application contectPath. Both the tests, 
and the Apache bridge interpret urls that don't start with applicqation context 
as internal, while that isn't required by bridge spec and breack JSF contract. 
Jsf prepends internal references in the ViewHandler and expects absolute urls 
in ExternalContext methods. Current implementation in Apache bridge complete 
blocks access to resources outside of application, either from applications 
deployed in the same container or portal resources.
2) Fix bridge version test that incorrectly compares version to 1.0 in assert, 
but message tells about 2.0
3) Fix exception thrown during application restart. It doesn't affect any test, 
but keep server log clear.

> Test URL should be 
> "resources/myImage.jpg?javax.portlet.faces.BackLink=myBackLinkParam"
> ---------------------------------------------------------------------------------------
>
>                 Key: PORTLETBRIDGE-217
>                 URL: https://issues.apache.org/jira/browse/PORTLETBRIDGE-217
>             Project: MyFaces Portlet Bridge
>          Issue Type: TCK Challenge
>          Components: TCK
>    Affects Versions: 2.0.0
>            Reporter: Wesley Hales
>            Assignee: Michael Freedman
>         Attachments: pbr-tck.patch, pbr-tck.patch
>
>
> [Alexander Smirnov & Wesley Hales: Red Hat]
> [jsr329-1.0.0]
> [portlet_2_bridge-1_0-final-spec]
> [chapter_6/section_6_5_1/Tests#testImplicitObject,
> chapter_6/section_6_1_3_1/Tests#illegalRedirectRenderTest,
> chapter_4/section_4_2_1/InitMethodTestPortlet#init,
> /testsuite/beans/NonJSFViewBean#getUrl]
> [https://issues.jboss.org/browse/PBR-254?focusedCommentId=12611867&page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#comment-12611867
> Many tests failed because of possible TCK issue, that threats URLs not 
> started with application context as internals.
> Following this logic (and given Oracle's use of encodeActionURL to encode its 
> equivalent of the OutputLink) then encodeAction should do a return 
> portletResponse.encodeURL(target) if the url begins with a / and isn't (this 
> application) context-path prefixed. I.e. we need the bridge code to give the 
> portlet container a chance to encode the server/port (construct and absolute 
> url) - typically when the portlet container is remote.
> Sound about right? I know the spec doesn't say anything about this but it 
> seems to fall out from this decision/interpretation. Does your code already 
> do this? If not should it?
> Mike
> On 6/14/2011 1:29 PM, Michael Freedman wrote:
> > So what you are saying is that because ViewHandler.getResourceURL() is 
> > defined and it will always append the ContextPath then the spec/impl should 
> > assume that urls starting with '/' that don't contain a ContextPath must be 
> > out of the application (because all in application urls would have been 
> > channeled through getResourceURL? I.e. just using /xxx as a resource url 
> > without a context path doesn't work in servlet based JSF. Interesting - 
> > okay I see your logic. Please file a JIRA against the TCK indicating the 
> > test url it should use ought to be 
> > "resources/myImage.jpg?javax.portlet.faces.BackLink=myBackLinkParam". If 
> > possible please make the needed changes yourself and verify (and then 
> > submit the jira with either the details of the code change or a patch file).
> >
> > I will file a bug against the RI concerning its not treating / as an 
> > external url - and since we are changing the test/fixing a bug will just 
> > include in the 2.0.1 release.
> > Mike
> ]

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

Reply via email to