202 lines
7.4 KiB
Plaintext
Raw Normal View History

<?xml version="1.0" encoding="UTF-8" ?>
<!--
Licensed to the Apache Software Foundation (ASF) under one or more
contributor license agreements. See the NOTICE file distributed with
this work for additional information regarding copyright ownership.
The ASF licenses this file to You under the Apache License, Version 2.0
(the "License"); you may not use this file except in compliance with
the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
$Header:$
-->
<web-app xmlns="http://java.sun.com/xml/ns/j2ee"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd"
version="2.4">
<display-name>Beehive NetUI JSF Samples Web Application</display-name>
<context-param>
<param-name>com.sun.faces.validateXml</param-name>
<param-value>true</param-value>
<description>
Set this flag to true if you want the JavaServer Faces
Reference Implementation to validate the XML in your
faces-config.xml resources against the DTD. Default
value is false.
</description>
</context-param>
<context-param>
<param-name>com.sun.faces.verifyObjects</param-name>
<param-value>true</param-value>
<description>
Set this flag to true if you want the JavaServer Faces
Reference Implementation to verify that all of the application
objects you have configured (components, converters,
renderers, and validators) can be successfully created.
Default value is false.
</description>
</context-param>
<!-- Filter to perform Page Flow operations when JSPs are hit directly. -->
<filter>
<filter-name>PageFlowJspFilter</filter-name>
<filter-class>org.apache.beehive.netui.pageflow.PageFlowJspFilter</filter-class>
</filter>
<!-- Filter to perform Page Flow operations when JavaServer Faces pages are hit directly. -->
<filter>
<filter-name>PageFlowFacesFilter</filter-name>
<filter-class>org.apache.beehive.netui.pageflow.PageFlowFacesFilter</filter-class>
</filter>
<!--
It is possible - but certainly not required - to keep source files such as page flows and
JavaServer Faces backing beans mixed in with web content. In this case, and when the web
content directory itself is being deployed without being copied to some other build
location, it is important to prevent the source code from being URL-addressable. This
filter returns a specified error code when source files are requested.
-->
<filter>
<filter-name>PageFlowForbiddenFilter</filter-name>
<filter-class>org.apache.beehive.netui.pageflow.PageFlowForbiddenFilter</filter-class>
<init-param>
<param-name>response-code</param-name>
<param-value>404</param-value>
</init-param>
</filter>
<filter-mapping>
<filter-name>PageFlowJspFilter</filter-name>
<url-pattern>*.jsp</url-pattern>
<dispatcher>FORWARD</dispatcher>
<dispatcher>REQUEST</dispatcher>
<dispatcher>INCLUDE</dispatcher>
</filter-mapping>
<filter-mapping>
<filter-name>PageFlowJspFilter</filter-name>
<url-pattern>*.jspx</url-pattern>
<dispatcher>FORWARD</dispatcher>
<dispatcher>REQUEST</dispatcher>
<dispatcher>INCLUDE</dispatcher>
</filter-mapping>
<filter-mapping>
<filter-name>PageFlowFacesFilter</filter-name>
<url-pattern>*.faces</url-pattern>
<dispatcher>FORWARD</dispatcher>
<dispatcher>REQUEST</dispatcher>
<dispatcher>INCLUDE</dispatcher>
</filter-mapping>
<filter-mapping>
<filter-name>PageFlowFacesFilter</filter-name>
<url-pattern>*.jsf</url-pattern>
<dispatcher>FORWARD</dispatcher>
<dispatcher>REQUEST</dispatcher>
<dispatcher>INCLUDE</dispatcher>
</filter-mapping>
<!-- Prevent URL access to Java source code. -->
<filter-mapping>
<filter-name>PageFlowForbiddenFilter</filter-name>
<url-pattern>*.java</url-pattern>
<dispatcher>REQUEST</dispatcher>
</filter-mapping>
<!-- Prevent URL access to JavaServer Faces backing beans. -->
<filter-mapping>
<filter-name>PageFlowForbiddenFilter</filter-name>
<url-pattern>*.jsfb</url-pattern>
<dispatcher>REQUEST</dispatcher>
</filter-mapping>
<!-- Prevent URL access to shared flow source files. -->
<filter-mapping>
<filter-name>PageFlowForbiddenFilter</filter-name>
<url-pattern>*.jpfs</url-pattern>
<dispatcher>REQUEST</dispatcher>
</filter-mapping>
<!-- Configuration/init listener for NetUI framework -->
<listener>
<listener-class>org.apache.beehive.netui.pageflow.PageFlowContextListener</listener-class>
</listener>
<!-- Listener to create NetUI framework HttpSession mutex objects -->
<listener>
<listener-class>org.apache.beehive.netui.pageflow.HttpSessionMutexListener</listener-class>
</listener>
<!-- Configuration/init listener for the JSF Reference Implementation -->
<listener>
<listener-class>com.sun.faces.config.ConfigureListener</listener-class>
</listener>
<!-- NetUI Servlet Configuration -->
<servlet>
<servlet-name>action</servlet-name>
<servlet-class>org.apache.beehive.netui.pageflow.PageFlowActionServlet</servlet-class>
<init-param>
<param-name>config</param-name>
<param-value>/WEB-INF/classes/_pageflow/struts-config.xml</param-value>
</init-param>
<load-on-startup>2</load-on-startup>
</servlet>
<!-- The XmlHttpRequest handler Servlet -->
<servlet>
<servlet-name>XmlHttpRequestServlet</servlet-name>
<servlet-class>org.apache.beehive.netui.pageflow.xmlhttprequest.XmlHttpRequestServlet</servlet-class>
</servlet>
<!-- Faces Servlet -->
<servlet>
<servlet-name>Faces Servlet</servlet-name>
<servlet-class>javax.faces.webapp.FacesServlet</servlet-class>
<load-on-startup> 1 </load-on-startup>
</servlet>
<!-- Struts Action Servlet Mappings -->
<!-- Note that because Struts takes the *last* mapping here as the extension to add to
actions posted from forms, we must have *.do come after *.jpf (etc.). -->
<servlet-mapping>
<servlet-name>action</servlet-name>
<url-pattern>*.jpf</url-pattern>
</servlet-mapping>
<servlet-mapping>
<servlet-name>action</servlet-name>
<url-pattern>*.do</url-pattern>
</servlet-mapping>
<!-- XmlHttpRequest Servlet -->
<servlet-mapping>
<servlet-name>XmlHttpRequestServlet</servlet-name>
<url-pattern>*.xhr</url-pattern>
</servlet-mapping>
<!-- Faces Servlet Mapping -->
<servlet-mapping>
<servlet-name>Faces Servlet</servlet-name>
<url-pattern>*.faces</url-pattern>
</servlet-mapping>
<welcome-file-list>
<welcome-file>index.jsp</welcome-file>
</welcome-file-list>
</web-app>