is faces-config.xml deprecated or required for JSF 2.0?
Going by the docs, it looks like fac开发者_StackOverflow中文版es-config.xml is required. However, I thought, for some reason, that Facelets used annotations and so no xml config was required(?). They say:
To configure JavaServer Faces to use Facelets as the ViewHandler, modify your project's faces-config.xml to specify the element
It seems like Facelets tutorials are often dead links, or, like above, will soon be dead links :(
The "docs" which you linked in the question concerns Facelets 1.x, not Facelets 2.x which is included in JSF 2.0. You should not read Facelets 1.x tutorials to learn Facelets/JSF 2.x. Refer the Java EE 6 tutorial for the official Facelets 2.x tutorial and JSF 2.x tutorial.
As to the annotations, they are not Facelets specific, they are JSF 2.x specific.
As to the dead links: some months ago *.dev.java.net sites have been migrated to *.java.net sites but the site admins made a disaster of it; the old URLs are not redirected, so the web remains with dead links. If you see a *.dev.java.net link, you need to remove the dev subdomain (and replace https scheme by http if necessary).
As to the question in the title: it's definitely not deprecated. It's still required. Bozho already pointed out the facts.
Faces-config.xml is still there for some global configurations, but most of it can be omitted if annotations are used. As for Facelets, they are now the default view technology in JSF. No need to configure or include anything.
精彩评论