faces
faces copied to clipboard
Improve Extensionless mapping
trying the "new" extensionless mapping on faces 4.0 but the url mapping with ".xhtml" should 301 to the same page without extension otherwise you will end with duplicate contents
e.g. GET /contacts.xhtml -> 301 -> /contacts
To me the correct implementation is the Omnifaces one, that should be the only one, also with Params mapping/rewriting support with annotation:
https://showcase.omnifaces.org/facesviews/ExtensionlessURLs
Yes, the OmniFaces one is more fully featured (Note that I wrote them both). For the standardised version in Faces itself I went for a more barebones approach. When there's demand and support for more features in Faces we can surely look at that for Faces.Next.
yeah I know ;P ... just to say that a this point the Omnifaces' one should be the standard one, because you have the following situation:
Faces 4+ have an extensionless functionality that is not enough for real case usage, so all the developers will use the Omnifaces one.
The consequence is that nobody will use the default implementation
The final consequence is that you should decide if:
- Remove the default implementation because it is not used
- Port the Omnifaces version because is the only one used in production
After so many years that jsf is around, the same is valid for a lot of others Omnifaces' solutions ... I think that at this point there are very few devs that are not using Omnifaces ( probably the only ones that are not aware of :) )