You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@myfaces.apache.org by "Leonardo Uribe (JIRA)" <de...@myfaces.apache.org> on 2017/03/22 03:30:41 UTC

[jira] [Commented] (MYFACES-4105) Implement extensionless mapping of views

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

Leonardo Uribe commented on MYFACES-4105:
-----------------------------------------

There are two parts in this issue:

1. Add .xhtml as a suffix mapping.
2. Allow non wildcard prefix that points to views with default suffix mapping.

After digging about this issue, I found the relevant points in JSF 2.3 pdf section 7.6.2.1 and 7.6.2.3

The problem I found is there is an old code that prevents /faces as a mapping for example because JSP VDL in this case enters in a redirection loop. The reason is JSP VDL in JSF 2.2 and earlier versions does not have a check for .jsp views, so the mapping will be recognized as something handled by JSP VDL by default. This was changed in JSF 2.3 (see MYFACES-4103), but this is not implicit in the spec, and instead this is a deduction done after trying to understand getViews(...) logic. Anyway, I'm sure we can change these lines. 

Now, what's left is update calculateActionURL(...) so the outcome or url can be properly mapped as a extensionless mapping. The spec does not cover add dynamic mappings but with getViews(...) and these changes we have everything we need to add automatic extensionless mapping as a implementation specific feature, but still the code that calculate prefix/suffix mapping for ResourceHandler could be still broken in that case. The old code does not take into account ServletContext.getServletRegistration(...) exists (was compatible with Servlet 2.3-2.5), so we still need to cover those holes and possibly check how navigation algorithm is affected.     

> Implement extensionless mapping of views
> ----------------------------------------
>
>                 Key: MYFACES-4105
>                 URL: https://issues.apache.org/jira/browse/MYFACES-4105
>             Project: MyFaces Core
>          Issue Type: Bug
>          Components: JSR-372
>            Reporter: Leonardo Uribe
>            Assignee: Leonardo Uribe
>
> See:
> http://arjan-tijms.omnifaces.org/p/jsf-23.html#1260
> Now we have already implemented getViews(...),  it is a good time to check how this one works.



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)