Sample Apps: Spring data MongoDB and JSF Integration tutorial (PART 3)
MyFaces
MyFaces is used as the JSF implementation in this application. The following details should be added in web.xml
PrimeFaces Theme
As said before, PrimeFaces library is used to enhance the UI. There is nearly no configuration required for this library. PrimeFaces provides many pre-designed theme for your web application. In our case, we use "blue-sky" theme. We just add the following setting in web.xml.
JSF and Spring Integration:
To integrate JSF with Spring, you have to specify the SpringBeanFacesELResolver in Faces-config.xml
Faces-config.xml
Full web.xml
MongoDB connection Details
In to order connect to MongoDB, you have to register a MongoDbFactory instance in XML. The connection details is specified in spring-application-context.xml
spring-application-context.xml
Originally published at https://www.borislam.com on December 9, 2021.