67624786057d68abeabca6b6ea4ca4906a596630
[photos] / src / main / webapp / WEB-INF / web.xml
1 <?xml version="1.0" encoding="ISO-8859-1"?>
2 <web-app xmlns="http://java.sun.com/xml/ns/javaee"
3         xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
4         xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_3_0.xsd"
5         version="3.0">
6
7         <display-name>cdi</display-name>
8
9         <!--  
10               There are three means to configure Wickets configuration mode and they are
11               tested in the order given. 
12               1) A system property: -Dwicket.configuration
13               2) servlet specific <init-param>
14               3) context specific <context-param>
15               The value might be either "development" (reloading when templates change)
16               or "deployment". If no configuration is found, "development" is the default.
17         -->
18         
19         <filter>
20                 <filter-name>authentication</filter-name>
21                 <filter-class>org.wamblee.photos.security.AuthenticationFilter</filter-class>
22                 <init-param>
23                         <param-name>loginpage</param-name>
24                         <param-value>/login.jsp</param-value>
25                 </init-param>
26                 <!-- each authenticated user is assigned to the gruop ALL in the security realm configuration --> 
27                 <init-param>
28                         <param-name>role</param-name>
29                         <param-value>ALL</param-value>
30                 </init-param>
31                 <!-- defines the resource URLs for which no authentication is required --> 
32                 <init-param>
33                         <param-name>resources</param-name>
34                         <param-value>/resources</param-value>
35                 </init-param>
36         </filter>
37
38         <filter>
39                 <filter-name>photos</filter-name>
40                 <filter-class>org.apache.wicket.protocol.http.WicketFilter</filter-class>
41                 <init-param>
42                         <param-name>applicationClassName</param-name>
43                         <param-value>org.wamblee.photos.wicket.WicketApplication</param-value>
44                 </init-param>
45                 <init-param>
46                         <param-name>configuration</param-name>
47                         <param-value>development</param-value>
48                 </init-param>
49         </filter>
50
51     <filter-mapping>
52         <filter-name>authentication</filter-name>
53         <url-pattern>/*</url-pattern>
54     </filter-mapping>
55         <filter-mapping>
56                 <filter-name>photos</filter-name>
57                 <url-pattern>/*</url-pattern>
58         </filter-mapping>
59         
60         <security-constraint>
61                 <web-resource-collection>
62                         <web-resource-name>resources</web-resource-name>
63                         <url-pattern>/resources/*</url-pattern>
64                 </web-resource-collection>
65         </security-constraint>
66         <security-constraint>
67                 <web-resource-collection>
68                         <web-resource-name>securedaccess</web-resource-name>
69                         <url-pattern>/*</url-pattern>
70                 </web-resource-collection>
71                 <auth-constraint>
72                         <role-name>ALL</role-name>
73                         <role-name>users</role-name>
74                 </auth-constraint>
75         </security-constraint>
76         
77         <login-config>
78                 <auth-method>FORM</auth-method>
79                 <realm-name>PhotoXChangeRealm</realm-name>
80                 <form-login-config>
81                         <form-login-page>/login.jsp</form-login-page>
82                         <form-error-page>/loginError.jsp</form-error-page>
83                 </form-login-config>
84         </login-config>
85         
86         <session-config>
87                 <session-timeout>10</session-timeout>
88         </session-config>
89         
90         <welcome-file-list>
91                 <welcome-file>login.jsp</welcome-file>
92         </welcome-file-list>
93         
94         <security-role>
95                 <role-name>ALL</role-name>
96         </security-role>
97         
98 </web-app>