The javadoc for ResourceVisitOption.html says the following: https://javaee.github.io/javaee-spec/javadocs/javax/faces/application/ResourceVisitOption.html
public static final ResourceVisitOption TOP_LEVEL_VIEWS_ONLY 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. Thanks, Paul Nicolucci From: Thomas Andraschko <[email protected]> To: MyFaces Development <[email protected]> Date: 11/18/2017 07:22 AM Subject: Re: Dev Discussion - JSF 2.3 ResourceVisitOption.TOP_LEVEL_VIEWS_ONLY different between MyFaces and Mojarra Did you checked the spec texts? 2017-11-17 19:56 GMT+01:00 Paul Nicolucci <[email protected]>: Hello, I was testing out the ResourceHandler.getViewResources() today and I noticed that we have quite a behavior different between the two implementations. 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 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. I think we need a dev discussion to determine if we want to stick with our current behavior or change it. Thanks, Paul Nicolucci
