- 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.
- Data Visualization with D3 4.x Cookbook(Second Edition)
- JavaScript前端開發(fā)模塊化教程
- Java高并發(fā)核心編程(卷2):多線程、鎖、JMM、JUC、高并發(fā)設計模式
- R語言數(shù)據(jù)可視化之美:專業(yè)圖表繪制指南
- 營銷數(shù)據(jù)科學:用R和Python進行預測分析的建模技術(shù)
- 精通軟件性能測試與LoadRunner實戰(zhàn)(第2版)
- Servlet/JSP深入詳解
- Banana Pi Cookbook
- Python數(shù)據(jù)分析從0到1
- 精通Linux(第2版)
- Linux:Embedded Development
- 運用后端技術(shù)處理業(yè)務邏輯(藍橋杯軟件大賽培訓教材-Java方向)
- IDA Pro權(quán)威指南(第2版)
- Mastering Apache Camel
- 深入淺出 HTTPS:從原理到實戰(zhàn)