Skip Headers
Oracle® Application Development Framework Developer's Guide
10g Release 3 (10.1.3)
B25386-01
  Go To Documentation Library
Home
Go To Product List
Solution Area
Go To Table Of Contents
Contents
Go To Index
Index

Previous
Previous
Next
Next
 

5.4 Configuring the ADF Binding Filter

The binding filter is a servlet filter, which is an instance of the oracle.adf.model.servlet.ADFBindingFilter class. ADF web applications use the ADF binding filter to preprocess any HTTP requests that may require access to the binding context.

The binding filter performs the following functions:

5.4.1 How to Configure the ADF Binding Filter

The first time you add a databound UI component to a page using the Data Control Palette, JDeveloper automatically configures the filter in the application's web.xml file.

To configure the binding filter, JDeveloper adds the following elements to the web.xml file:

5.4.1.1 Configuring the Servlet Context Parameter

The servlet context parameter specifies which DataBindings.cpx file the binding filter reads at runtime to define the application binding context. The servlet context parameter is defined in the web.xml file, as shown in Example 5-2. The param-name element must contain the value CpxFileName, and the param-value element must contain the fully qualified name of the application's DataBindings.cpx file.

Example 5-4 Servlet Context Parameter Defined in the web.xml File

<context-param>
   <param-name>CpxFileName</param-name>
   <param-value>oracle.srdemo.view.DataBindings</param-value>
</context-param>

5.4.1.2 Configuring ADF Binding Filter Class

The ADF binding filter implements the javax.servlet.Filter interface and is defined in the web.xml file, as shown in Example 5-5. The filter-name element must contain the value adfBindings, and the filter-class element must contain the fully qualified name of the binding filter class, which is oracle.adf.model.servlet.ADFBindingFilter.

Example 5-5 Binding Filter Class Defined in the web.xml File

<filter>
   <filter-name>adfBindings</filter-name>
   <filter-class>oracle.adf.model.servlet.ADFBindingFilter</filter-class>
</filter>

5.4.1.3 Configuring the Filter Mapping

Filter mappings link filters to static resources or servlets in the web application. When a mapped resource is requested, a filter is invoked. Filter mappings are defined in the web.xml file, as shown in Example 5-6. The filter-name element must contain the value adfBindings. Notice that in the example there is a filter mapping for both types of page formats: jsp and jspx.

Example 5-6 Filter Mapping Defined in the web.xml File

 <filter-mapping>
    <filter-name>adfBindings</filter-name>
    <url-pattern>*.jsp</url-pattern>
 </filter-mapping>
 <filter-mapping>
    <filter-name>adfBindings</filter-name>
    <url-pattern>*.jspx</url-pattern>
 </filter-mapping>

Tip:

If you have multiple filters defined in the web.xml file, be sure to list them in the order in which you want them to run. At runtime, the filters are called in the sequence they appear in the file.