- Java EE 8 Application Development
- David R. Heffelfinger
- 201字
- 2021-07-02 22:04:59
Optional faces-config.xml
Legacy J2EE applications suffered from what some have considered to be excessive XML configuration.
Java EE 5 took some measures to reduce XML configuration considerably. Java EE 6 reduced the required configuration even further, making the JSF configuration file, faces-config.xml, optional in JSF 2.0.
In JSF 2.0 and newer versions, JSF managed beans can be configured via the @ManagedBean annotation, obviating the need to configure them in faces-config.xml. Java EE 6 introduced the Contexts and Dependency Injection (CDI) API, which provides an alternate way of implementing functionality typically implemented with JSF managed beans. As of JSF 2.2, CDI named beans are preferred over JSF managed beans; JSF 2.3 went even further, deprecating specific JSF-managed beans in favor of CDI named beans.
Additionally, there is a convention for JSF navigation: if the value of the action attribute of a JSF 2.0 command link or command button matches the name of a facelet (minus the XHTML extension), then by convention, the application will navigate to the facelet matching the action name. This convention allows us to avoid having to configure application navigation in faces-config.xml.
For many modern JSF applications, faces-config.xml is completely unnecessary as long as we follow established JSF conventions.
- Spring Cloud Alibaba核心技術與實戰(zhàn)案例
- 潮流:UI設計必修課
- Vue.js 2 and Bootstrap 4 Web Development
- Learning C++ Functional Programming
- Mastering Python Scripting for System Administrators
- Python從入門到精通(精粹版)
- 數(shù)據(jù)結構(C語言)
- Linux命令行與shell腳本編程大全(第4版)
- Python時間序列預測
- 數(shù)據(jù)結構習題解析與實驗指導
- C++面向對象程序設計習題解答與上機指導(第三版)
- HTML5從入門到精通 (第2版)
- 小程序從0到1:微信全棧工程師一本通
- Delphi開發(fā)典型模塊大全(修訂版)
- Application Development with Swift