myfaces-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Leonardo Uribe (JIRA)" <>
Subject [jira] [Commented] (MYFACES-4105) Implement extensionless mapping of views
Date Wed, 22 Mar 2017 03:30:41 GMT


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

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:
>             Project: MyFaces Core
>          Issue Type: Bug
>          Components: JSR-372
>            Reporter: Leonardo Uribe
>            Assignee: Leonardo Uribe
> See:
> Now we have already implemented getViews(...),  it is a good time to check how this one

This message was sent by Atlassian JIRA

View raw message