There is an inconsistency in how DXA resolves normal and contextual views.
- Add your views to
In your case:
Notice that this will brake contextual view resolve from modules. We don't have any in DXA though.
Screenshot of my IDE
Contextual views are being checked whether they exist in
dxa.web.views.folder is set to
/META-INF/resources/ by default, so for
Article.iphone view the path is
At the same time, ViewResolver tries to resolve the view from either
<webapp>/WEB-INF (one level up from the classpath). For JARs it also tries
So while for views from JAR, both default check&resolve will find a JAR in a
/META-INF/resources/WEB-INF, for web application check in
META-INF will pass but resolve fail. You need either to set both to classpath root in a webapp or create your own module to solve this issue. See short story. :)