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

Leonardo Uribe commented on MYFACES-3726:
-----------------------------------------

I can see the justification behind this. It is an special case and it should be 
fixed at every location where the contextPath is used. I tried a simple jsf 
application running as root and I can't see any difference, but that does not 
means the fix is not valid, maybe here a combination of factors that at the end 
cause the problem.

I have attached a patch with the changes to be commited. Thanks for report it.
                
> root context induces wrong urls
> -------------------------------
>
>                 Key: MYFACES-3726
>                 URL: https://issues.apache.org/jira/browse/MYFACES-3726
>             Project: MyFaces Core
>          Issue Type: Bug
>            Reporter: Romain Manni-Bucau
>
> When the webapp context is root ("/") its name is still appended before the 
> urls (i didn't check all cases) so we end up with urls like //index.xhtml 
> which makes the navigation not working anymore.
> I'm sure it happens at least in 
> org.apache.myfaces.shared.application.DefaultViewHandlerSupport#calculateActionURL
>  where
>        builder.append(contextPath);
> should be replaced by
>        if (!"/".equals(contextPath)) {
>             builder.append(contextPath);
>         }
> We saw this issue in tomee (here a sample to reproduce it 
> https://github.com/maxtorzito/tomee-codi)

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

Reply via email to