faces-config.xml is a key configuration file type within a Java Server Faces (JSF) software implementation.
The Java Platform, Enterprise Edition specification refers to this type of file as an Application Configuration Resource File.
There may be more than such file within a Java Enterprise application.
Most simple Java based dynamic web applications make their configuration files available as a resource named /WEB-INF/faces-config.xml
If a resource named /META-INF/faces-config.xml exists in any of the JAR files within the web application's /WEB-INF/lib/ directory or in parent class loaders, it is loaded as a configuration resource.
Enterprise-scale applications that delegate partial responsibility for maintaining configuration files to separate groups may specify one or more paths to multiple faces-config.xml configuration files. The relevant context initialization parameter is called javax.faces.application.CONFIG_FILES. Multiple (comma-delimited) paths to Application Configuration Resource Files may be specfied.
The faces-config.xml file effectively provides the glue that links together multiple elements in JSF's interpretation of the Model-view-controller (MVC), Factory Pattern and Inversion of Control (IoC) software design patterns.
By centralising all of these configuration aspects of JSF in a single location, faces-config.xml itself implements the Encapsulation design pattern.
The format of the file is XML version 1.0 compliant. The structure of the file is defined by a Document Type Definition (DTD), which is subject to license terms of Sun Microsystems Inc. This is published at:
http://java.sun.com/dtd/web-facesconfig_1_0.dtd
The top level definition elements within a Version 1.0 Java Server Faces configuration are as follows:
application - JSF's solution for defining classes that have application-wide scope i.e. only a single instance of the object will exist
component - JSF's solution for defining concrete user interface implementation classes that have a unique relationship with a specified type identifier. Component definitions also include related properties (JavaBean configuration elements) and attributes (configuration elements implemented by component).
converter - JSF's solution for defining concrete converter implementation classes that have a unique relationship with a specified converter identifier. Converter definitions also include related properties (JavaBeans properties of the Converter implementation class that may be configured to affect the operation of the Converter) and attributes (configuration elements that may be configured on the corresponding User Interface Component in order to affect the operation of the Converter).
factory - JSF's solution for enabling definition of factory objects, that instaniate other objects, enabling implementation of the Factory Pattern
lifecycle - JSF's solution for enabling the specification of modifications to the default "lifecycle" of a web application.
managed-bean - JSF's solution for instatiating & initialising Java objects, enabling implementation of the Inversion of Control design pattern
navigation-rule - JSF's solution for controlling transitions between JSP views
referenced-bean - JSF's solution for capturing at design time the promise that a Java object of the specified type will exist at runtime in some scope, under the specified key.
render-kit - JSF's solution for defining concrete RenderKit implementation classes that have a unique relationship with a specified render-kit-id. If no render-kit-id is specified, the identifier of the default RenderKit (RenderKitFactory.DEFAULT_RENDER_KIT) is assumed.
validator - JSF's solution for defining concrete Validator implementation classes that have a unique relatinoship with a specified validator identifier.
Validator definitions also include related properties (JavaBeans properties of the Validator implementation class that may be configured to affect the operation of the Validator) and attributes (configuration elements that may be configured on the corresponding User Interface Component in order to affect the operation of the Validator).
Google Search Engine
Tuesday, February 5, 2008
JavaServer Faces
JavaServer Faces (JSF) is a Java-based Web application framework that simplifies the development of user interfaces for Java EE applications. Unlike other traditional request-driven MVC web frameworks, JSF uses a component-based approach. The state of UI components is saved when the client requests a new page and then is restored when the request is returned. Out of the box, JSF uses JavaServer Pages (JSP) for its display technology, but JSF can also accommodate other display technologies (such as XUL). JSF includes:
A set of APIs for representing user interface (UI) components and managing their state, handling events and input validation, converting values, defining page navigation, and supporting internationalization and accessibility
A default set of UI components
Two JavaServer Pages (JSP) custom tag libraries for expressing a JavaServer Faces interface within a JSP page.
A server-side event model
State management
Managed Beans (JavaBeans created with dependency injection)
Unified Expression Language for both JSP 2.0 and JSF 1.2
A set of APIs for representing user interface (UI) components and managing their state, handling events and input validation, converting values, defining page navigation, and supporting internationalization and accessibility
A default set of UI components
Two JavaServer Pages (JSP) custom tag libraries for expressing a JavaServer Faces interface within a JSP page.
A server-side event model
State management
Managed Beans (JavaBeans created with dependency injection)
Unified Expression Language for both JSP 2.0 and JSF 1.2
Subscribe to:
Posts (Atom)