Skip to content
This repository has been archived by the owner on Sep 5, 2023. It is now read-only.

ResourceVisitOption.TOP_LEVEL_VIEWS_ONLY clarification #1461

Closed
pnicolucci opened this issue Dec 2, 2017 · 1 comment
Closed

ResourceVisitOption.TOP_LEVEL_VIEWS_ONLY clarification #1461

pnicolucci opened this issue Dec 2, 2017 · 1 comment

Comments

@pnicolucci
Copy link

ResourceVisitOption.TOP_LEVEL_VIEWS_ONLY states the following:

"Only visit resources that are top level views, i.e. views that can be used to serve a request as opposed to those that can only be used for includes."

The behavior between MyFaces and Mojarra is quite a bit different and I believe some clarification is needed in the specification.

Take the following application for example:

testApplication

  • /depth2/index.xhtml
    -META-INF/index.xhtml
    -WEB-INF/index.xhtml
  • index.xhtml
  • test

Mojarra getViewResources( call with ResourceVisitOptions )
/index.xhtml /depth2/index.xhtml

Mojarra getViewResources ( call without ResourceVisitOptions )
/index.xhtml /depth2/index.xhtml META-INF/index.xhtml WEB-INF/index.xhtml

MyFaces getViewResources( call with ResourceVisitOptions )
/index.xhtml /depth2/index.xhtml

MyFaces getViewResources( call without ResourceVisitOptions )
/index.xhtml /test /depth2/index.xhtml

In summary:

In MyFaces if we use the ResourceVisitOptions then we filter out any views that don't contain a valid suffix ( in the above case /test ). In addition MyFaces never returns any views in WEB-INF and META-INF

In Mojarra if we use the ResourceVisitOptions then anything in WEB-INF and META-INF is not included. In addition Mojarra never returns any views without a valid suffix.

@glassfishrobot
Copy link

Closing this as this issue is migrated to jakartaee/faces#1461

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants