Sunday, April 10, 2011

ADF Faces and Web Configuration Files - Explanation

               The following XML configuration files required in a JSF application appear in your UI project:


Configuring the Application’s Unbounded Task Flow
       The configuration file for an ADF unbounded task flow contains metadata about the activities and control flows contained in the unbounded task flow. The default name for this file is adfcconfig.xml, but an end user can change the name.

Configuring the Application: faces-config.xml

       ADFc is an extension to the JSF controller. This means that managed beans configured in the faces-config.xml file are also accessible if your application uses ADFc for navigation.
The search order is such that the reference to a managed bean is first resolved to faces-config.xml. If the bean is not found there, the ADFc configuration file isreferenced.

Although you can use both faces-config.xml and adfc-config.xml for configuration, Oracle recommends that you use one approach consistently. Because unbounded task flows are ADFc functionality and therefore are configured in adfc-config.xml, it may
be best to use that file for managed bean configuration also.

Configuring Skins:

    A trinidad-config.xml file must be placed in the WEB-INF directory of your Web application. This file has a very simple XML structure that relies on the JSF EL for flexibility.
Each configurable property can be defined either inline with a static, constant value, or with a JSF EL expression that is reevaluated on each request.

    You define your skins in the trinidad-skins.xml file. You can define the following attributes of a skin:

• ID: Each skin must have an ID. This is a unique identifier for a skin.
• Family: Each skin must have a family. A skin belongs to a family and you set it in the
trinidad-config.xml file under <skin-family>.
• Style sheet name: This is your skin’s style sheet name URL.

Setting Run-Time Configuration Parameters
     When you create a project in JDeveloper that uses the JSF technology, a starter web.xml file
with default settings is created for you in the /WEB-INF folder. To edit the file, double-click
web.xml in the Application Navigator to open it in the XML editor.

    You must configure the following in web.xml for all applications that use JSF and ADF Faces:

JSF servlet and mapping: The javax.faces.webapp.FacesServlet servlet that
manages the request processing life cycle for Web applications using JSF to construct the
user interface
ADF Faces filter and mapping: A servlet filter to ensure that ADF Faces is properly
initialized by establishing an AdfFacesContext object. This filter also processes file
ADF resource servlet and mapping: A servlet to serve Web application resources
(images, style sheets, JavaScript libraries) by delegating to a ResourceLoader
The JSF servlet and mapping configuration settings are automatically added to the starter
web.xml file when you first create a JSF project. When you insert an ADF Faces component

        onto a JSF page for the first time, JDeveloper automatically inserts the configuration settings for
both the ADF Faces filter and mapping and the resource servlet and mapping.

Examining Additional Metadata Files:

An ADF Web application uses other metadata files as well, such as:
• Application-level
- <application>.jws: Lists component versions and projects in an application
- cwallet.sso: Defines the application’s database connection credentials
- jps-config.xml: Lists the configuration file for credential store service
- connections.xml: Lists connections defined for the application
- adf-config.xml: Specifies application-level settings that are usually determined
at deployment (deployment profile) and often changed at run time by a managed
bean that is registered for the component configuration to specify run-time settings
• Any project
- <project>.jpr: Specifies project properties
- <project> Is the resource bundle containing translatable
• Model project
- <project>.jpx: Is the project configuration file for business components
• UI project
- pagetemplate-metadata.xml: Lists page templates in the project


  1. Hi I am working with jdeveloper, but I have a problem, when I load a page, exception is throw because the page don't found the bundle. The bundle is inside a package but jdveloper does not show the file inside IDE, it exist on disk, in desing time if I put a text from resource I see all key of the bundle. I try to include the bundle through Project Properties-> Resource Bundle -> Bundel Search -> Add Bundle, and I get this message, Selected file not found in project. Please can you give an idea. Regards Ivan

  2. I am working with ADF 11g and I want to prompt the user with a message that he is already logged in and needs to logout first if he tries to login from another browser or tab. It would be of great help if u could let me know the solution. My email is :