[jboss-cvs] jboss-seam/doc/reference/en/modules ...

Peter Muir peter at bleepbleep.org.uk
Fri May 4 07:31:35 EDT 2007


  User: pmuir   
  Date: 07/05/04 07:31:35

  Modified:    doc/reference/en/modules   configuration.xml annotations.xml
  Log:
  JBSEAM-1054, JBSEAM-1281
  
  Revision  Changes    Path
  1.45      +72 -1     jboss-seam/doc/reference/en/modules/configuration.xml
  
  (In the diff below, changes in quantity of whitespace are not shown.)
  
  Index: configuration.xml
  ===================================================================
  RCS file: /cvsroot/jboss/jboss-seam/doc/reference/en/modules/configuration.xml,v
  retrieving revision 1.44
  retrieving revision 1.45
  diff -u -b -r1.44 -r1.45
  --- configuration.xml	26 Mar 2007 16:19:56 -0000	1.44
  +++ configuration.xml	4 May 2007 11:31:35 -0000	1.45
  @@ -116,6 +116,9 @@
       <url-pattern>/*</url-pattern>
   </filter-mapping>]]></programlisting>
   
  +			<para>The Seam master filter <emphasis>must</emphasis> be the first filter specified in 
  +			<literal>web.xml</literal>.  This ensures it is run first. </para>
  +
               <para>
                   Adding the master filter enables the following built-in filters.
               </para>
  @@ -269,6 +272,52 @@
               </sect3>
   
               <sect3>
  +                <title>Ajax4jsf</title>
  +                <para>
  +                   If Ajax4jsf is used in your project, Seam will install the Ajax4jsf filter for you, making sure
  +                   to install it before all other built-in filters.  You don't need to install the 
  +                   Ajax4jsf filter in <literal>web.xml</literal> yourself.
  +                </para>
  +
  +                <para>
  +                    To override the default
  +                    settings, add the following entry to <literal>components.xml</literal>.  The options
  +                    are the same as those specified in the Ajax4jsf Developer Guide:
  +                </para>
  +
  +                <programlisting><![CDATA[<web:ajax4jsf-filter force-parser="true" 
  +        enable-cache="true" 
  +        log4j-init-file="custom-log4j.xml"/>]]></programlisting>
  +
  +-	
  +                <itemizedlist>
  +                    <listitem>
  +                        <para>
  +                            <literal>force-parser</literal> &mdash; forces all JSF pages to be validated by
  +                            Ajax4jsf's XML syntax checker. If <literal>false</literal>, only AJAX responses
  +                            are validated and converted to well-formed XML. Setting <literal>force-parser</literal>
  +                            to <literal>false</literal> improves performance, but can provide visual artifacts
  +                            on AJAX updates.
  +                        </para>
  +                    </listitem>
  +                    <listitem>
  +                        <para>
  +                            <literal>enable-cache</literal> &mdash; enables caching of framework-generated resources
  +                            (e.g. javascript, CSS, images, etc). When developing custom javascript or CSS, setting to
  +                            true prevents the browser from caching the resource.
  +                        </para>
  +                    </listitem>
  +                    <listitem>
  +                        <para>
  +                            <literal>log4j-init-file</literal> &mdash; is used to setup per-application logging.  A path,
  +                            relative to web application context, to the log4j.xml configuration file should be provided.
  +                        </para>
  +                    </listitem>
  +                </itemizedlist>
  +               
  +            </sect3>
  +
  +            <sect3>
                   <title>Context management for custom servlets</title>
                   <para>
                       Requests sent direct to some servlet other than the JSF servlet are not
  @@ -317,6 +366,28 @@
                  
               </sect3>
   
  +            <sect3>
  +                <title>Adding custom filters</title>
  +                <para>
  +                    Seam can install your filters for you, allowing you to specify <emphasis>where</emphasis>
  +                    in the chain your filter is placed (the servlet specification doesn't provide a well defined order
  +                    if you specify your filters in a <literal>web.xml</literal>).  Just add the <literal>@Filter</literal> annotation
  +                    to your Seam component (which must implement <literal>javax.servlet.Filter</literal>):
  +                </para>
  +                
  +                <programlisting><![CDATA[@Startup
  + at Scope(APPLICATION)
  + at Name("org.jboss.seam.web.multipartFilter")
  + at Intercept(NEVER)
  + at Filter(within="org.jboss.seam.web.ajax4jsfFilter")
  +public class MultipartFilter extends AbstractFilter {]]></programlisting>
  +            </sect3>
  +                
  +			<para>
  +			Adding the <literal>@Startup</literal> annotation means thar the component is available during 
  +			Seam startup; bijection isn't available here (<literal>@Intercept(NEVER)</literal>); and the filter should be
  +			further down the chain than the Ajax4jsf filter (<literal>@Filter(within="org.jboss.seam.web.ajax4jsfFilter")</literal>).
  +			</para>
           </sect2>
   
           <sect2>
  
  
  
  1.59      +34 -0     jboss-seam/doc/reference/en/modules/annotations.xml
  
  (In the diff below, changes in quantity of whitespace are not shown.)
  
  Index: annotations.xml
  ===================================================================
  RCS file: /cvsroot/jboss/jboss-seam/doc/reference/en/modules/annotations.xml,v
  retrieving revision 1.58
  retrieving revision 1.59
  diff -u -b -r1.58 -r1.59
  --- annotations.xml	4 May 2007 09:29:20 -0000	1.58
  +++ annotations.xml	4 May 2007 11:31:35 -0000	1.59
  @@ -1108,5 +1108,39 @@
   
       </section>
   
  +    <section>
  +        <title>Annotations for integrating with the servlet container</title>
  +        <para>These annotations allow you to integrate your Seam components with the servlet container.</para>
  +
  +
  +        <variablelist spacing="compact">
  +            <varlistentry>
  +                <term>
  +                    <literal>@Filter</literal>
  +                </term>
  +                <listitem>
  +                	<para>
  +                		Use the Seam component (which implements <literal>javax.servlet.Filter</literal>) annotated with <literal>@Filter</literal> as a servlet filter.  It
  +                		will be executed by Seam's master filter.
  +                	</para>
  +                    <itemizedlist>
  +                        <listitem>
  +                    		<programlisting><![CDATA[@Filter(around={"seamComponent", "otherSeamComponent"})]]></programlisting>
  +                    		<para> Specifies that this filter is positioned higher in the stack than the given
  +                        filters. </para>
  +                </listitem>
  +                <listitem>
  +                    <programlisting><![CDATA[@Filter(within={"seamComponent", "otherSeamComponent"})]]></programlisting>
  +                    <para> Specifies that this filter is positioned deeper in the stack than the given
  +                        filters. </para>
  +                </listitem>
  +                    </itemizedlist>
  +                </listitem>
  +            </varlistentry>
  +
  +        </variablelist>
  +
  +    </section>
  +
   
   </chapter>
  
  
  



More information about the jboss-cvs-commits mailing list