Oracle ADF Model and Business Components API Reference 10.1.2 B14022-02


oracle.adf.model.servlet
Class ADFBindingFilter

java.lang.Object
  extended byoracle.adf.model.servlet.ADFBindingFilter

All Implemented Interfaces:
javax.servlet.Filter

public class ADFBindingFilter
extends java.lang.Object
implements javax.servlet.Filter

The ADFBindingFilter is used to pre-process any http requests to resources that may require access to the ADF runtime. It is responsible for: - Initializing the Binding Context for a user's http session. - Serializing all incoming http requests within a session. - Notifying data control instances that a request is about to be served. - Notifying data control instances after the response has been served to the client.


Field Summary
static java.lang.String INIT_PARAMETER_ENCODING
static java.lang.String INIT_PARAMETER_NAME

Constructor Summary
ADFBindingFilter()

Method Summary
void destroy()
Cleans up any applications-specific resources that where allocated.
void doFilter(javax.servlet.ServletRequest request, javax.servlet.ServletResponse response, javax.servlet.FilterChain chain)
The main filter function.
void init(javax.servlet.FilterConfig filterConfig)
initializes the servlet by retrieving the 'encoding' parameter and saving it's value for subsequent use.
static BindingContext initializeBindingContext(javax.servlet.http.HttpServletRequest request)
Initalizes the binding context by reading the CPX file defined by the 'CpxFileName' init parameter.
protected void processEncoding(javax.servlet.ServletRequest srequest, javax.servlet.ServletResponse sresponse)
Set the character encoding on the request using the value stored in the init param of the web.xml.

Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Field Detail

INIT_PARAMETER_NAME

public static final java.lang.String INIT_PARAMETER_NAME
See Also:
Constant Field Values

INIT_PARAMETER_ENCODING

public static final java.lang.String INIT_PARAMETER_ENCODING
See Also:
Constant Field Values

Constructor Detail

ADFBindingFilter

public ADFBindingFilter()

Method Detail

init

public void init(javax.servlet.FilterConfig filterConfig)
          throws javax.servlet.ServletException
initializes the servlet by retrieving the 'encoding' parameter and saving it's value for subsequent use. The encoding is important for initalizing http request and response objects to the correct encoding for support of NLS applications.
Specified by:
init in interface javax.servlet.Filter
Parameters:
filterConfig -
Throws:
javax.servlet.ServletException

destroy

public void destroy()
Cleans up any applications-specific resources that where allocated.
Specified by:
destroy in interface javax.servlet.Filter

doFilter

public void doFilter(javax.servlet.ServletRequest request,
                     javax.servlet.ServletResponse response,
                     javax.servlet.FilterChain chain)
              throws java.io.IOException,
                     javax.servlet.ServletException
The main filter function. This processes the http request and makes sure that the binding context is initialized for use by the controller and/or any web pages that use data binding.
Specified by:
doFilter in interface javax.servlet.Filter
Parameters:
request -
response -
chain -
Throws:
java.io.IOException
javax.servlet.ServletException

initializeBindingContext

public static BindingContext initializeBindingContext(javax.servlet.http.HttpServletRequest request)
Initalizes the binding context by reading the CPX file defined by the 'CpxFileName' init parameter.
Parameters:
request -
Returns:

processEncoding

protected void processEncoding(javax.servlet.ServletRequest srequest,
                               javax.servlet.ServletResponse sresponse)
                        throws java.io.UnsupportedEncodingException
Set the character encoding on the request using the value stored in the init param of the web.xml. If the value is not defined in the web.xml, do not change the character encoding.
Parameters:
srequest - ServletRequest
sresponse - ServletResponse
Throws:
java.io.UnsupportedEncodingException

Oracle ADF Model and Business Components API Reference 10.1.2 B14022-02


Copyright © 1997, 2005, Oracle. All rights reserved.