1: <?xml version="1.0" encoding="UTF-8"?>
2: <web-app version="2.5"
3: xmlns="http://java.sun.com/xml/ns/javaee"
4: xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
5: xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd">
6:
7: <display-name>Musico</display-name>
8: <description>Website for musicians, music bands and musical events</description>
9:
10: <!-- ======== Context params ======== -->
11: <context-param>
12: <param-name>com.sun.faces.verifyObjects</param-name>
13: <param-value>false</param-value>
14: </context-param>
15: <context-param>
16: <param-name>com.sun.faces.validateXml</param-name>
17: <param-value>true</param-value>
18: </context-param>
19: <context-param>
20: <param-name>javax.faces.STATE_SAVING_METHOD</param-name>
21: <param-value>client</param-value>
22: </context-param>
23: <context-param>
24: <param-name>baseUri</param-name>
25: <param-value>/musico-war/</param-value>
26: </context-param>
27:
28: <!-- ======== Servlet settings ======== -->
29: <servlet>
30: <servlet-name>Faces Servlet</servlet-name>
31: <servlet-class>javax.faces.webapp.FacesServlet</servlet-class>
32: <load-on-startup>1</load-on-startup>
33: </servlet>
34: <servlet-mapping>
35: <servlet-name>Faces Servlet</servlet-name>
36: <url-pattern>*.jsf</url-pattern>
37: </servlet-mapping>
38:
39: <!-- ======== Session config ======== -->
40: <session-config>
41: <session-timeout>3600</session-timeout>
42: </session-config>
43:
44: <!-- ======== Welcome file ======== -->
45: <welcome-file-list>
46: <welcome-file>redirect.jsp</welcome-file>
47: </welcome-file-list>
48:
49:
50: <!-- ======== Error handler ======== -->
51: <error-page>
52: <error-code>404</error-code>
53: <location>/error/http404.jsf</location>
54: </error-page>
55: <!--
56: <error-page>
57: <exception-type>java.lang.Throwable</exception-type>
58: <location>/error/throwable.jsf</location>
59: </error-page>
60: -->
61:
62: <!-- ======== JSP config ======== -->
63: <jsp-config>
64: <jsp-property-group>
65: <description>Property group for common configuration for all the JSP files</description>
66: <url-pattern>*.jsp</url-pattern>
67: <scripting-invalid>false</scripting-invalid>
68: <trim-directive-whitespaces>true</trim-directive-whitespaces>
69: </jsp-property-group>
70:
71: </jsp-config>
72:
73:
74: <!-- ======== Security constraints ======== -->
75:
76: <security-constraint>
77: <display-name>Member constraint</display-name>
78: <web-resource-collection>
79: <web-resource-name>member constraint</web-resource-name>
80: <description/>
81: <url-pattern>/member/*</url-pattern>
82: <http-method>GET</http-method>
83: <http-method>HEAD</http-method>
84: <http-method>POST</http-method>
85: </web-resource-collection>
86: <auth-constraint>
87: <description/>
88: <role-name>member</role-name>
89: </auth-constraint>
90: </security-constraint>
91:
92: <security-constraint>
93: <display-name>Admin constraint</display-name>
94: <web-resource-collection>
95: <web-resource-name>admin constraint</web-resource-name>
96: <description/>
97: <url-pattern>/admin/*</url-pattern>
98: <http-method>GET</http-method>
99: <http-method>HEAD</http-method>
100: <http-method>POST</http-method>
101: </web-resource-collection>
102: <auth-constraint>
103: <description/>
104: <role-name>admin</role-name>
105: </auth-constraint>
106: </security-constraint>
107:
108: <!-- ======== Login config ======== -->
109: <login-config>
110: <auth-method>FORM</auth-method>
111: <realm-name>musicoLoginRealm</realm-name>
112: <form-login-config>
113: <form-login-page>/login/login.jsf</form-login-page>
114: <form-error-page>/login/error.jsf</form-error-page>
115: </form-login-config>
116: </login-config>
117:
118: <!-- ======== Security roles ======== -->
119: <security-role>
120: <description>not logged website visitor</description>
121: <role-name>guest</role-name>
122: </security-role>
123: <security-role>
124: <description>logged website visitor</description>
125: <role-name>member</role-name>
126: </security-role>
127: <security-role>
128: <description>website administrator</description>
129: <role-name>admin</role-name>
130: </security-role>
131:
132:
133: </web-app>
134: