blob: 900c07793611c2f5b9a5dc6a31637190c6a6c8ef [file]
<?xml version="1.0" encoding="ISO-8859-1"?>
<!--
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.
-->
<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>Click Examples</display-name>
<!--
Provides an in memory databae initialization filter. In a production
application a separate database would be used, and this filter would not
be needed.
-->
<filter>
<filter-name>DatabaseInitFilter</filter-name>
<filter-class>org.apache.click.examples.util.DatabaseInitFilter</filter-class>
</filter>
<!--
Provides a thread local Cayenne DataContext filter.
-->
<filter>
<filter-name>DataContextFilter</filter-name>
<filter-class>org.apache.click.extras.cayenne.DataContextFilter</filter-class>
<init-param>
<param-name>session-scope</param-name>
<param-value>false</param-value>
</init-param>
</filter>
<!--
Provides a web application performance filter which compresses the response
and sets the Expires header on selected static resources.
The "cachable-paths" init parameter tells the filter resources can have
their Expires header set so the browser will cache them.
The "excludes-path" init parameter tells the filter which requests should
be ignored by the filter.
-->
<filter>
<filter-name>PerformanceFilter</filter-name>
<filter-class>org.apache.click.extras.filter.PerformanceFilter</filter-class>
<init-param>
<param-name>cachable-paths</param-name>
<param-value>/assets/*</param-value>
</init-param>
<init-param>
<param-name>exclude-paths</param-name>
<param-value>*/excel-export.htm</param-value>
</init-param>
</filter>
<filter-mapping>
<filter-name>DatabaseInitFilter</filter-name>
<servlet-name>ClickServlet</servlet-name>
</filter-mapping>
<filter-mapping>
<filter-name>DataContextFilter</filter-name>
<servlet-name>ClickServlet</servlet-name>
</filter-mapping>
<filter-mapping>
<filter-name>PerformanceFilter</filter-name>
<servlet-name>ClickServlet</servlet-name>
</filter-mapping>
<filter-mapping>
<filter-name>PerformanceFilter</filter-name>
<url-pattern>*.css</url-pattern>
</filter-mapping>
<filter-mapping>
<filter-name>PerformanceFilter</filter-name>
<url-pattern>*.js</url-pattern>
</filter-mapping>
<filter-mapping>
<filter-name>PerformanceFilter</filter-name>
<url-pattern>*.gif</url-pattern>
</filter-mapping>
<filter-mapping>
<filter-name>PerformanceFilter</filter-name>
<url-pattern>*.png</url-pattern>
</filter-mapping>
<!--
The Spring Click Servlet which handles *.htm requests. The "spring-path"
init parameter tells the servlet where to find the Spring application
context file on the classpath.
-->
<servlet>
<servlet-name>ClickServlet</servlet-name>
<servlet-class>org.apache.click.extras.spring.SpringClickServlet</servlet-class>
<init-param>
<param-name>spring-path</param-name>
<param-value>/applicationContext.xml</param-value>
</init-param>
<load-on-startup>0</load-on-startup>
</servlet>
<servlet-mapping>
<servlet-name>ClickServlet</servlet-name>
<url-pattern>*.htm</url-pattern>
</servlet-mapping>
<welcome-file-list>
<welcome-file>redirect.html</welcome-file>
</welcome-file-list>
</web-app>