Blame view

war/src/main/webapp/WEB-INF/web.xml 6.07 KB
Krzysztof Miksa authored
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176
<?xml version="1.0" encoding="UTF-8" ?>
<web-app version="2.5" xmlns="http://java.sun.com/xml/ns/javaee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
         xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd">

    <!-- For cluster, add distributable as the first child element, seam_reference-35.1.2 -->    <!-- <distributable /> -->

    <display-name>${app.display.name}</display-name>

    <error-page>
        <error-code>404</error-code>
        <location>/404.xhtml</location>
    </error-page>

    <!-- RichFaces  -->
    <context-param>
        <param-name>org.richfaces.SKIN</param-name>
        <param-value>glassX</param-value>
    </context-param>

    <!-- Suppress spurious stylesheets -->
    <context-param>
        <param-name>org.richfaces.CONTROL_SKINNING</param-name>
        <param-value>disable</param-value>
    </context-param>

    <context-param>
        <param-name>org.richfaces.CONTROL_SKINNING_LEVEL</param-name>
        <param-value>extended</param-value>
    </context-param>

    <context-param>
        <param-name>org.richfaces.CONTROL_SKINNING_CLASSES</param-name>
        <param-value>disable</param-value>
    </context-param>

    <!-- Change load strategy to DEFAULT to disable sending scripts/styles as packs -->
    <context-param>
        <param-name>org.richfaces.LoadStyleStrategy</param-name>
        <param-value>DEFAULT</param-value>
    </context-param>

    <context-param>
        <param-name>org.richfaces.LoadScriptStrategy</param-name>
        <param-value>DEFAULT</param-value>
    </context-param>

    <context-param>
        <param-name>org.ajax4jsf.COMPRESS_SCRIPT</param-name>
        <param-value>${org.ajax4jsf.COMPRESS_SCRIPT}</param-value>
    </context-param>

    <!-- Seam -->
    <listener>
        <listener-class>org.jboss.seam.servlet.SeamListener</listener-class>
    </listener>

    <filter>
        <filter-name>Seam Filter</filter-name>
        <filter-class>org.jboss.seam.servlet.SeamFilter</filter-class>
    </filter>

    <filter-mapping>
        <filter-name>Seam Filter</filter-name>
        <url-pattern>/*</url-pattern>
    </filter-mapping>

    <servlet>
        <servlet-name>Seam Resource Servlet</servlet-name>
        <servlet-class>org.jboss.seam.servlet.SeamResourceServlet</servlet-class>
    </servlet>

    <servlet-mapping>
        <servlet-name>Seam Resource Servlet</servlet-name>
        <url-pattern>/seam/resource/*</url-pattern>
    </servlet-mapping>

    <!-- Facelets -->

    <!-- Facelets development mode (disable in production) -->
    <context-param>
        <param-name>facelets.DEVELOPMENT</param-name>
        <param-value>${app.debug}</param-value>
    </context-param>

    <context-param>
        <description>
            Strip html comments from the page before it is rendred - meaning that you will no longer be bugged down by EL evaluating expressions inside a
            comment tag
        </description>
        <param-name>facelets.SKIP_COMMENTS</param-name>
        <param-value>true</param-value>
    </context-param>

    <!-- SiA source code, ch11 -->    <!--
	<context-param>
		<description>
			If the view cannot be found in the session on a JSF postback, rebuild
			the view again before executing the Restore View phase. This step
			prevents "stale" public form pages. Enable this feature if you need it.
		</description>
		<param-name>facelets.BUILD_BEFORE_RESTORE</param-name>
		<param-value>false</param-value>
	</context-param>
	-->

    <!-- JSF -->
    <context-param>
        <param-name>javax.faces.DEFAULT_SUFFIX</param-name>
        <param-value>.xhtml</param-value>
    </context-param>

    <servlet>
        <servlet-name>Faces Servlet</servlet-name>
        <servlet-class>javax.faces.webapp.FacesServlet</servlet-class>
        <load-on-startup>1</load-on-startup>
    </servlet>

    <servlet-mapping>
        <servlet-name>Faces Servlet</servlet-name>
        <url-pattern>*.seam</url-pattern>
    </servlet-mapping>

    <!-- Not shure if this is needed
     <context-param>
         <description>
             JSF 1.2 detects the ViewHandler/StateManager version from the
             faces-config.xml DTD/XML schema name. The faces-config.xml files in
             the RichFaces JARs use the JSF 1.1 DTDs, causing JSF to use 1.1
             behavior. Setting this flag to false ignores the version of the DTD
             used in these files, thus ensuring that JSF uses 1.2 behavior.

             One of the critical improvements in JSF 1.2 is that it throws a
             ViewExpiredException on a session timeout.

             See http://jira.jboss.com/jira/browse/RF-2294 and
             http://lists.jboss.org/pipermail/seam-dev/2008-February/000024.html.
         </description>
         <param-name>com.sun.faces.disableVersionTracking</param-name>
         <param-value>true</param-value>
     </context-param>
     -->

    <!-- URL Rewrite Filter - declare after seam filter -->    <!--
		There are two rewrite options in Seam, you can choose to either use the org.tuckey 
		UrlRewriteFilter or the native Seam rewriting. You should not attempt to use both. 
		The native Seam rewriting does not use the org.tuckey rewrite engine at all. 
		If you are going to use Seam's native rewriting, then remove the org.tuckey
		UrlRewriteFilter from web.xml and nuke the urlrewrite.xml file. 
		With Seam 2.1 or newer it is recommend to use Seam's native rewrite engine.
	 -->    <!--
	<filter>
		<filter-name>UrlRewriteFilter</filter-name>
		<filter-class>org.tuckey.web.filters.urlrewrite.UrlRewriteFilter</filter-class>
	</filter>
	
	<filter-mapping>
		<filter-name>UrlRewriteFilter</filter-name>
		<url-pattern>/*</url-pattern>
	</filter-mapping>
	-->

    <session-config>
        <session-timeout>10</session-timeout>
    </session-config>

    <!-- -->
    <security-constraint>
        <display-name>Restrict raw XHTML Documents</display-name>
        <web-resource-collection>
            <web-resource-name>XHTML</web-resource-name>
            <url-pattern>*.xhtml</url-pattern>
        </web-resource-collection>
        <auth-constraint/>
    </security-constraint>

</web-app>