ADF Faces configuration options are defined in the web.xml file using <context-param> elements.
STATE_SAVING_METHOD :
The JSF parameter javax.faces.STATE_SAVING_METHOD identifies where the state of the view is stored between requests.
By default, the state is saved in the servlet session. Set the STATE_SAVING_METHOD parameter to client in the context-param stanza of the web.xml file, so that JSF stores the state of the entire view in a hidden field on the rendered page. If you do not, then JSF may attempt to cache that state,
which is not serializable, in the session object.
<context-param>
<param-name>javax.faces.STATE_SAVING_METHOD</param-name>
<param-value>client</param-value>
</context-param>
CLIENT_STATE_METHOD :
org.apache.myfaces.trinidad.CLIENT_STATE_METHOD specifies the type of client-side state saving to use when client-side state saving is enabled by using javax.faces.STATE_SAVING_METHOD.
The values for CLIENT_STATE_METHOD are:
token : (Default) Stores the page state in the session, but persists a token to the client. The simple token, which identifies a block of state stored back on the HttpSession object, is stored on the client. This enables ADF Faces to disambiguate the same page appearing multiple times. Failover is supported.
all : Stores all state information on the client in a (potentially large) hidden form field. It is useful for developers who do not want to use HttpSession.
Because of the potential size of storing all state information, it is recommended that you set client-state saving to token.
Framebusting :
Use the oracle.adf.view.rich.security.FRAME_BUSTING context parameter to use framebusting in your application. Framebusting is a way to prevent clickjacking, which occurs when a malicious web site pulls a page originating from another domain into a frame and overlays it with a counterfeit page, allowing only portions of the original, or clickjacked, page (for example, a button) to display.
When users click the button, they in fact are clicking a button on the clickjacked page, causing unexpected results.
For example, say your application is a web-based email application that resides in DomainA, and a web site in DomainB clickjacks your page by creating a page with an IFrame that points to a page in your email application at DomainA. When the two pages are combined, the page from DomainB
covers most of your page in the IFrame, and exposes only a button on your page that deletes all email for the account. Users, not realizing they are actually in the email application, may click the button and inadvertently delete all their email.
Framebusting prevents clickjacking by using the following JavaScript to block the application's pages from running in frames:
top.location.href = location.href;
Valid values are:
always : The page will show an error and redirect whenever it attempts to run in a frame.
differentDomain : The page will show an error and redirect only when it attempts to run in a frame on a page that originates in a different domain (the default).
never : The page can run in any frame on any originating domain.
More on ADF Faces Configuration
Comments
Post a Comment