Attachment 'sample-web.xml'

Download

   1 <?xml version="1.0" encoding="UTF-8"?>
   2 <web-app version="2.4" 
   3          xmlns="http://java.sun.com/xml/ns/j2ee"
   4          xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
   5          xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd">
   6     
   7     <!-- ************************ SEAM Listener **************************** -->
   8       <listener>
   9           <listener-class>org.jboss.seam.servlet.SeamListener</listener-class>
  10       </listener>
  11     
  12     <!-- ************************ Listener for use with MyFaces **************************** -->
  13     <listener>
  14         <listener-class>org.apache.myfaces.webapp.StartupServletContextListener</listener-class>
  15     </listener>
  16     
  17     <!-- ************************ Listener for use with Sun JSF RI **************************** -->
  18     <!--<listener>
  19         <listener-class>com.sun.faces.config.ConfigureListener</listener-class>
  20     </listener> -->
  21     
  22 
  23     <!-- ************************ SEAM Config **************************** -->
  24     <!-- 300 second conversation timeout -->
  25     <context-param>
  26         <param-name>org.jboss.seam.core.manager.conversationTimeout</param-name>
  27         <param-value>300000</param-value>
  28     </context-param>
  29     
  30     <!-- Enable debugging -->
  31     <context-param>
  32         <param-name>org.jboss.seam.core.init.debug</param-name>
  33         <param-value>true</param-value>
  34     </context-param>    
  35     
  36     <!-- ************************ JSF Config **************************** -->
  37     <!-- Use documents saved as *.xhtml for Facelets -->
  38     <context-param>
  39         <param-name>javax.faces.DEFAULT_SUFFIX</param-name>
  40         <param-value>.xhtml</param-value>
  41     </context-param>
  42     
  43     <!-- Use client-side state saving.  In Trinidad, it is an
  44         optimized, token-based mechanism that is almost always a
  45         better choice than the standard JSF server-side state saving. -->
  46     <context-param>
  47         <param-name>javax.faces.STATE_SAVING_METHOD</param-name>
  48         <param-value>client</param-value>
  49     </context-param>
  50     
  51     <!-- Trinidad by default uses an optimized client-side state saving
  52        mechanism. To disable that, uncomment the following -->
  53     <!--context-param>
  54       <param-name>org.apache.myfaces.trinidad.CLIENT_STATE_METHOD</param-name>
  55       <param-value>all</param-value>
  56     </context-param-->
  57     
  58     
  59     <!-- ************************ FACELETS Config **************************** -->
  60     <context-param>
  61         <param-name>facelets.DEVELOPMENT</param-name>
  62         <param-value>true</param-value>
  63     </context-param>
  64     
  65     <context-param>
  66         <param-name>facelets.REFRESH_PERIOD</param-name>
  67         <param-value>2</param-value>
  68     </context-param>
  69     
  70     <!-- Prevents HTML-Comments from beeing rendered -->
  71     <context-param>
  72         <param-name>facelets.SKIP_COMMENTS</param-name>
  73         <param-value>true</param-value>
  74     </context-param>
  75     
  76     
  77     <!-- ************************ AJAX4JSF Config **************************** -->
  78     
  79     <!-- Do not use with Trinidad.
  80     <context-param>
  81         <param-name>org.ajax4jsf.SKIN</param-name>
  82         <param-value>DEFAULT</param-value>
  83     </context-param>-->
  84     
  85     
  86     <!-- ************************ Trinidad Config **************************** -->
  87     <!-- Trinidad also supports an optimized strategy for caching some
  88    view state at an application level, which significantly improves
  89    scalability.  However, it makes it harder to develop (updates to
  90    pages will not be noticed until the server is restarted), and in
  91    some rare cases cannot be used for some pages (see Trinidad
  92    documentation for more information) -->
  93    <context-param>
  94         <param-name>org.apache.myfaces.trinidad.USE_APPLICATION_VIEW_CACHE</param-name>
  95         <param-value>false</param-value>
  96     </context-param>
  97     
  98      <!-- Trinidad has its own ViewHandler, which is a "decorating"
  99        view handler - for example, it needs to wrap methods like renderView()
 100        to perform some extra pre- and post-handling.  Facelets, on the other
 101        hand, is more of a true ViewHandler - it actually implements
 102        renderView() (yeah, it decorates too, but forget about that
 103        for a second).  As a result, the world is a better place if
 104        the Trinidad ViewHandler runs around the Facelets ViewHandler.
 105        But since Facelets is registered in WEB-INF/faces-config.xml,
 106        and Trinidad's is registered from META-INF/faces-config.xml in its
 107        JAR, exactly the opposite happens as per the JSF spec.
 108 
 109        Hence, the following config parameter, which Trinidad
 110        exposes to allow pushing a ViewHandler inside
 111        of ours.  FWIW, you retain the entire delegation stack - 
 112        just flipped around a bit - so that Facelets still decorates
 113        the standard ViewHandler, and therefore you've still got
 114        JSP support.
 115     -->
 116     <context-param>
 117         <param-name>org.apache.myfaces.trinidad.ALTERNATE_VIEW_HANDLER</param-name>
 118         <param-value>com.sun.facelets.FaceletViewHandler</param-value>
 119     </context-param>
 120     
 121     <!-- If this parameter is enabled, Trinidad will automatically
 122        check the modification date of your JSPs, and discard saved
 123        state when they change;  this makes development easier,
 124        but adds overhead that should be avoided when your application
 125        is deployed -->
 126     <context-param>
 127         <param-name>org.apache.myfaces.trinidad.CHECK_FILE_MODIFICATION</param-name>
 128         <param-value>true</param-value>
 129     </context-param>
 130     
 131     <context-param>
 132         <param-name>org.apache.myfaces.trinidadinternal.DISABLE_CONTENT_COMPRESSION</param-name>
 133         <param-value>true</param-value>
 134     </context-param>
 135     
 136     
 137     <!-- ************************ AJAX4JSF Filter **************************** -->
 138     <!-- If you have other filters declared in the web.xml, be sure that Ajax4jsf Filter is declared before the others. -->
 139     <filter>
 140         <display-name>Ajax4jsf Filter</display-name>
 141         <filter-name>ajax4jsf</filter-name>
 142         <filter-class>org.ajax4jsf.Filter</filter-class>
 143         <init-param>
 144             <param-name>forceparser</param-name>
 145             <param-value>false</param-value>
 146         </init-param>
 147     </filter>
 148     
 149     <filter-mapping>
 150         <filter-name>ajax4jsf</filter-name>
 151         <servlet-name>Faces Servlet</servlet-name>        
 152         <dispatcher>REQUEST</dispatcher>
 153         <dispatcher>FORWARD</dispatcher>
 154         <dispatcher>INCLUDE</dispatcher>
 155     </filter-mapping>
 156     
 157     
 158     <!-- ************************ Trinidad Filter **************************** -->
 159     <filter>
 160         <filter-name>Trinidad</filter-name>
 161         <filter-class>org.apache.myfaces.trinidad.webapp.TrinidadFilter</filter-class>
 162     </filter>
 163     
 164     <filter-mapping>
 165         <filter-name>Trinidad</filter-name>
 166         <servlet-name>Faces Servlet</servlet-name>
 167     </filter-mapping>
 168     
 169     
 170     <!-- ************************ Seam Filter **************************** -->
 171     <filter>
 172         <filter-name>Seam Exception Filter</filter-name>
 173         <filter-class>org.jboss.seam.servlet.SeamExceptionFilter</filter-class>
 174     </filter>
 175     
 176     <filter-mapping>
 177         <filter-name>Seam Exception Filter</filter-name>
 178         <url-pattern>/*</url-pattern>
 179     </filter-mapping>
 180     
 181     <filter>
 182         <filter-name>Seam Redirect Filter</filter-name>
 183         <filter-class>org.jboss.seam.servlet.SeamRedirectFilter</filter-class>
 184     </filter>
 185     
 186     <filter-mapping>
 187         <filter-name>Seam Redirect Filter</filter-name>
 188         <url-pattern>*.seam</url-pattern>
 189     </filter-mapping>
 190     
 191     
 192     <!-- ************************ Faces Servlet Mapping **************************** -->
 193     <servlet>
 194         <servlet-name>Faces Servlet</servlet-name>
 195         <servlet-class>javax.faces.webapp.FacesServlet</servlet-class>
 196         <load-on-startup>1</load-on-startup>
 197     </servlet>
 198     
 199     <servlet-mapping>
 200         <servlet-name>Faces Servlet</servlet-name>
 201         <url-pattern>*.seam</url-pattern>
 202     </servlet-mapping>
 203     
 204     
 205     <!-- ************************ Trinidad resources servlet **************************** -->
 206     <servlet>
 207         <servlet-name>Trinidad Resources</servlet-name>
 208         <servlet-class>org.apache.myfaces.trinidad.webapp.ResourceServlet</servlet-class>
 209     </servlet>
 210     
 211     <!-- This cannot be configured currently -->
 212     <servlet-mapping>
 213         <servlet-name>Trinidad Resources</servlet-name>
 214         <url-pattern>/adf/*</url-pattern>
 215     </servlet-mapping>
 216     
 217     
 218     <!-- ************************ Misc **************************** -->
 219     <session-config>
 220         <session-timeout>30</session-timeout>
 221     </session-config>
 222     
 223     <welcome-file-list>
 224         <welcome-file>
 225             index.jsp
 226         </welcome-file>
 227     </welcome-file-list>
 228     
 229 </web-app>

Attached Files

To refer to attachments on a page, use attachment:filename, as shown below in the list of files. Do NOT use the URL of the [get] link, since this is subject to change and can break easily.
  • [get | view] (2007-03-02 09:03:23, 6.5 KB) [[attachment:sample-web-1-2-0.xml]]
  • [get | view] (2007-02-28 13:55:38, 8.9 KB) [[attachment:sample-web.xml]]
 All files | Selected Files: delete move to page

You are not allowed to attach a file to this page.