[
https://issues.apache.org/jira/browse/MYFACES-4662?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17841343#comment-17841343
]
Volodymyr Siedlecki commented on MYFACES-4662:
----------------------------------------------
5.0: https://github.com/apache/myfaces/pull/709
> Update FaceletViewDeclarationLanguageStrategy to look at exact mappings to
> the Faces Servlet
> --------------------------------------------------------------------------------------------
>
> Key: MYFACES-4662
> URL: https://issues.apache.org/jira/browse/MYFACES-4662
> Project: MyFaces Core
> Issue Type: Improvement
> Affects Versions: 4.0.0, 4.1.0-RC1
> Reporter: Volodymyr Siedlecki
> Priority: Major
>
> While investigating the 4.1 TCK tests, a 404 was returned for some pages in
> the headAndBodyRenderer app. Only the `*.xhtml` extensions worked even though
> the servlet mappings were listed:
> web.xml:
> {code:java}
> <servlet>
> <servlet-name>facesServlet</servlet-name>
> <servlet-class>jakarta.faces.webapp.FacesServlet</servlet-class>
> </servlet>
> <servlet-mapping>
> <servlet-name>facesServlet</servlet-name>
> <url-pattern>*.xhtml</url-pattern>
> <url-pattern>*.xhtmlAsXhtml</url-pattern>
> <url-pattern>*.xhtmlAsXml</url-pattern>
> </servlet-mapping>{code}
> Turns out that our FaceletViewDeclarationLanguageStrategy class looked if
> *.xhtml matched, and if not, then it looked at any mappings set via
> jakarta.faces.FACELETS_VIEW_MAPPINGS. This isn't set in the app. Ultimately,
> FaceletViewDeclarationLanguageStrategy#handlesView returns false and since no
> VDL is found, the page fails to load.
> [https://github.com/apache/myfaces/blob/7f6fefb4b05ccf5272e6907397954f7d4db8f4d2/impl/src/main/java/org/apache/myfaces/view/facelets/FaceletViewDeclarationLanguageStrategy.java#L62-L76
>
> |https://github.com/jakartaee/faces/tree/4.1/tck/faces41/headAndBodyRenderer/src/main/webapp]
> I think we should update the code to look at the servlet mappings, too.
--
This message was sent by Atlassian Jira
(v8.20.10#820010)