Why do we need beans.xml while working with JSF web application?
问题 I started web development using JSF, after studying JSP and Servlets for a while. When you create a JSF web application you always(may be often but I am not sure if it always or not) have to create beans.xml and you don't write anything in it. But, if that file doesn't exist the JSF web app will not work. What is the reason behind that? Why we need that file? Please, detailed explanation. 回答1: Adding to the answer of Micheal; CDI is not only useful in combination with JSF because of the