<?xml version="1.0" encoding="UTF-8"?>
<section id="WebApplicationDescriptorParameters" role="updated">
          <?dbhtml filename="WebApplicationParameters.html"?>

          <title>Web Application Descriptor Parameters</title>

          <para>RichFaces doesn&apos;t require any parameters to be defined in your web.xml. But
                    the <property>RichFaces</property> parameters listed below may help with
                    development and may increase the flexibility of RichFaces usage.</para>

          <para>
                    <table>
                              <title>Initialization Parameters</title>

                              <tgroup cols="3">
		                              	<colspec colnum="1" colwidth="2*"/>
		                              	<colspec colnum="2" colwidth="1*"/>
		                              	<colspec colnum="3" colwidth="2*"/>
                              	
                                        <thead>
                                                  <row>
                                                  <entry>Name</entry>

                                                  <entry>Default</entry>

                                                  <entry>Description</entry>
                                                  </row>
                                        </thead>

                                        <tbody>

                                                  <row>
                                                  <entry>org.richfaces.SKIN</entry>

                                                  <entry>DEFAULT</entry>

                                                  <entry>Is a name of a skin used in an
                                                  application. It can be a
                                                  literal string with a skin
                                                  name, or the <emphasis>
                                                  <property>EL</property>
                                                  </emphasis> expression
                                                  (<code>#{...}</code>)
                                                  pointed to a <emphasis>
                                                  <property>String</property>
                                                  </emphasis> property (skin
                                                  name) or a property of a
                                                  org.richfaces.framework.skin
                                                  type. Skin in last case, this
                                                  instance is used as a current
                                                  skin</entry>
                                                  </row>

                                                  <row>
                                                  <entry>org.richfaces.LoadScriptStrategy</entry>

                                                  <entry>DEFAULT</entry>

                                                  <entry>Defines how the RichFaces script
                                                  files are loaded to
                                                  application. Possible values
                                                  are: ALL, DEFAULT, NONE. For
                                                  more information see <link
                                                  linkend="ScriptsandStylesLoadStrategy"
                                                  >&quot;Scripts
                                                  and Styles Load
                                                  Strategy&quot;</link>.</entry>
                                                  </row>

                                                  <row>
                                                  <entry>org.richfaces.LoadStyleStrategy</entry>

                                                  <entry>DEFAULT</entry>

                                                  <entry>Defines how the RichFaces style
                                                  files are loaded to
                                                  application. Possible values
                                                  are: ALL, DEFAULT, NONE. For
                                                  more information see <link
                                                  linkend="ScriptsandStylesLoadStrategy"
                                                  >&quot;Scripts
                                                  and Styles Load
                                                  Strategy&quot;</link>.</entry>
                                                  </row>

                                                  <row>
                                                  <entry>org.ajax4jsf.LOGFILE</entry>

                                                  <entry>none</entry>

                                                  <entry>Is an URL to an application or a
                                                  container log file (if
                                                  possible). If this parameter
                                                  is set, content from the given
                                                  URL is shown on a <emphasis>
                                                  <property>Debug</property>
                                                  </emphasis> error page in the <emphasis>
                                                  <property>iframe</property>
                                                  </emphasis> window</entry>
                                                  </row>

                                                  <row>
                                                  <entry>org.ajax4jsf.VIEW_HANDLERS</entry>

                                                  <entry>none</entry>

                                                  <entry>Is a comma-separated list of
                                                  custom <emphasis>
                                                  <property>ViewHandler</property>
                                                  </emphasis> instances for
                                                  inserting in chain. Handlers
                                                  are inserted BEFORE RichFaces
                                                  viewhandlers in the given
                                                  order. For example, in
                                                  facelets application this
                                                  parameter must contain
                                                  com.sun.facelets.FaceletViewHandler,
                                                  instead of declaration in
                                                  faces-config.xml</entry>
                                                  </row>

                                                  <row>
                                                  <entry>org.ajax4jsf.CONTROL_COMPONENTS</entry>

                                                  <entry>none</entry>

                                                  <entry>Is a comma-separated list of
                                                  names for a component as a
                                                  special control case, such as
                                                  messages bundle loader, alias
                                                  bean components, etc. Is a
                                                  type of component got by a
                                                  reflection from the static
                                                  field <emphasis>
                                                  <property>COMPONENT_TYPE</property>
                                                  </emphasis>. For components
                                                  with such types encode methods
                                                  always are called in rendering
                                                  Ajax responses, even if a
                                                  component isn&apos;t in an
                                                  updated part</entry>
                                                  </row>

                                                  <row>
                                                  <entry>org.ajax4jsf.ENCRYPT_RESOURCE_DATA</entry>

                                                  <entry>false</entry>

                                                  <entry>For generated resources, such as
                                                  encrypt generation data,
                                                  it&apos;s encoded in the
                                                  resource URL. For example, URL
                                                  for an image generated from
                                                  the <emphasis>
                                                  <property>mediaOutput</property>
                                                  </emphasis> component contains
                                                  a name of a generation method,
                                                  since for a hacker attack, it
                                                  is possible to create a
                                                  request for any JSF baked
                                                  beans or other attributes. To
                                                  prevent such attacks, set this
                                                  parameter to
                                                  &quot;true&quot; in
                                                  critical applications (works
                                                  with JRE &gt; 1.4
                                                  )</entry>
                                                  </row>

                                                  <row>
                                                  <entry>org.ajax4jsf.ENCRYPT_PASSWORD</entry>

                                                  <entry>random</entry>

                                                  <entry>Is a password for encryption of
                                                  resources data. If
                                                  isn&apos;t set, a random
                                                  password is used</entry>
                                                  </row>

                                                  <row>
                                                  <entry>org.ajax4jsf.COMPRESS_SCRIPT</entry>
                                                  <entry>true</entry>
                                                  <entry>It doesn&apos;t allow
                                                  framework to reformat
                                                  JavaScript files (makes it
                                                  impossible to debug) </entry>
                                                  </row>
                                                  <row>
                                                  <entry>org.ajax4jsf.RESOURCE_URI_PREFIX</entry>
                                                  <entry>a4j</entry>
                                                  <entry> Defines prefix which is added to
                                                  all URIs of generated
                                                  resources. This prefix
                                                  designed to handle RichFaces
                                                  generated resources requests
                                                  </entry>
                                                  </row>
                                                  <row>
                                                  <entry>org.ajax4jsf.GLOBAL_RESOURCE_URI_PREFIX</entry>
                                                  <entry>a4j/g</entry>
                                                  <entry> Defines prefix which is added to
                                                  URIs of global resources. This
                                                  prefix designed to handle
                                                  RichFaces generated resources
                                                  requests </entry>
                                                  </row>
                                                  <row>
                                                  <entry>org.ajax4jsf.SESSION_RESOURCE_URI_PREFIX</entry>
                                                  <entry>a4j/s</entry>
                                                  <entry> Defines prefix which is used for
                                                  session tracking for generated
                                                  resources. This prefix
                                                  designed to handle RichFaces
                                                  generated resources requests
                                                  </entry>
                                                  </row>
                                                  <row>
                                                  <entry>org.ajax4jsf.DEFAULT_EXPIRE</entry>
                                                  <entry>86400</entry>
                                                  <entry> Defines in seconds how long
                                                  streamed back to browser
                                                  resources can be cached
                                                  </entry>
                                                  </row>

                                                  <row>
                                                  <entry>org.ajax4jsf.SERIALIZE_SERVER_STATE</entry>
                                                  <entry>false</entry>
                                                  <entry> If enabled the component state
                                                  (not the tree) will be
                                                  serialized before being stored
                                                  in the session. This may be
                                                  desirable for applications
                                                  that may have issues with view
                                                  state being sensitive to model
                                                  changes. Instead of this
                                                  parameter can use
                                                  <code>com.sun.faces.serializeServerState</code>
                                                  and <code>
                                                  org.apache.myfaces.SERIALIZE_STATE_IN_SESSION
                                                  </code> parameters for
                                                  corresponding environments.
                                                  </entry>
                                                  </row>

                                        </tbody>
                              </tgroup>
                    </table>
          </para>

          <note>
                    <title>Note:</title>
                    <para><code>org.richfaces.SKIN</code> is used in the same way as
                                        <code>org.ajax4jsf.SKIN</code></para>
          </note>

          <para>
                    <table>
                              <title>org.ajax4jsf.Filter Initialization Parameters</title>

                              <tgroup cols="3">
                                        <thead>
                                                  <row>
                                                  <entry>Name</entry>

                                                  <entry>Default</entry>

                                                  <entry>Description</entry>
                                                  </row>
                                        </thead>

                                        <tbody>
                                                  <row>
                                                  <entry>log4j-init-file</entry>

                                                  <entry>-</entry>

                                                  <entry>Is a path (relative to web
                                                  application context) to the <emphasis>
                                                  <property>log4j.xml</property>
                                                  </emphasis> configuration
                                                  file, it can be used to setup
                                                  per-application custom
                                                  logging</entry>
                                                  </row>

                                                  <row>
                                                  <entry>enable-cache</entry>

                                                  <entry>true</entry>

                                                  <entry>Enable caching of
                                                  framework-generated resources
                                                  (JavaScript, CSS, images,
                                                  etc.). For debug purposes
                                                  development custom JavaScript
                                                  or Style prevents to use old
                                                  cached data in a
                                                  browser</entry>
                                                  </row>

                                                  <row>
                                                            <entry>forcenotrf</entry>

                                                  <entry>true</entry>

                                                  <entry>Force parsing by a filter <emphasis>
                                                  <property>HTML</property>
                                                  </emphasis> syntax checker on
                                                  any JSF page. If
                                                  &quot;false&quot;,
                                                  only Ajax responses are parsed
                                                  to syntax check and conversion
                                                  to well-formed XML. Setting to
                                                  &quot;false&quot;
                                                  improves performance, but can
                                                  provide visual effects on Ajax
                                                  updates</entry>
                                                  </row>
                                        </tbody>
                              </tgroup>
                    </table>
          </para>
</section>
