Summary
This chapter was a brief introduction to Jakarta Faces, the supporting frameworks such as CDI and BV, and how to deploy an application. Looking at the life cycle should give you an understanding of what the Faces servlet is doing. While web page rendering is most commonly the domain of JavaScript frameworks, Faces should be considered as an alternative to the JavaScript approach. Its integration with CDI and BV makes it a solid foundation for web apps. BV can ensure that all validation is done on the server. This does not preclude using validation in JS. However, with a simple tool such as curl
, you could easily submit invalid data if validation only occurred on the client side in JS.
In our next and final chapter, we will look at how Java applications can be packaged for easy deployment to a server or distributed for easy use as a desktop application.