I followed this tutorial to create a basic Spring MVC 3 and JSF 2 app.
For any given Controller how does Spring MVC associate a controller with an appropriate .xhtml file. For example in the tutorial above helloWorld.xhtml is associated with the HelloWorldController. But I can’t see any configuration file which creates this association.
I followed this tutorial to create a basic Spring MVC 3 and JSF 2
Share
The magic is happening in the applicationContext.xml, this block defining the viewResolver bean in particular:
this part of the configuration looks in your webapp’s /WEB-INF/views/ directory for .xhtml files that match the pattern of the view name that your controllers return.