I have been studying JavaEE8 and practicing with some projects, understanding the new technologies like Servlet 4.0 and JSF 2.3. I have read in many forums and pages, in some I see that they say that web.xml and faces-config.xml are not necessary, because annotations are now used, but in some others they continue to use them.
In which cases should you continue to use the Web Deployment Descriptor-> web.xml and the application configuration resource file-> faces-config.xml?
They aren't required, but I'd highly recommend to use them since you'll need them sooner or later for additional configuration anyways.
The annotations are used to achieve better readability and to simplify the
faces-config.xmlandweb.xml, however they do not even nearly allow for the configuration options that can be made in the configuration files. For example you can use the@FacesValidatorAnnotation instead of declaring and referencing the corresponding class in thefaces-config.xml.A task that can't be achieved by using annotations would be the declaratation of a welcome page. If you want to specify it, you need the
web.xml.