web.xml 2.92 KB
<?xml version="1.0" encoding="UTF-8"?>
<web-app xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
	xmlns="http://xmlns.jcp.org/xml/ns/javaee"
	xsi:schemaLocation="http://xmlns.jcp.org/xml/ns/javaee http://xmlns.jcp.org/xml/ns/javaee/web-app_3_1.xsd"
	version="3.1">
	<display-name>MoyaEventMgmtWeb</display-name>
	<welcome-file-list>
		<welcome-file>index.html</welcome-file>
		<welcome-file>index.jsf</welcome-file>
		<welcome-file>index.jsp</welcome-file>
		<welcome-file>index.wtf</welcome-file>
	</welcome-file-list>
	<context-param>
		<param-name>javax.faces.FACELETS_SKIP_COMMENTS</param-name>
		<param-value>true</param-value>
	</context-param>
	<!-- Asetetaan PROJwECT_STAGE JNDI:llä, ja fallbackataan arvoon Development -->
	<resource-ref>
		<res-ref-name>jsf/ProjectStage</res-ref-name>
		<res-type>java.lang.String</res-type>
	</resource-ref>
	<context-param>
		<param-name>javax.faces.PROJECT_STAGE</param-name>
		<param-value>Development</param-value>
	</context-param>
	<filter>
		<display-name>PrimefacesFileupload</display-name>
		<filter-name>PrimefacesFileupload</filter-name>
		<filter-class>org.primefaces.webapp.filter.FileUploadFilter</filter-class>
	</filter>
	
	<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>*.jsf</url-pattern>
	</servlet-mapping>
	<error-page>
		<exception-type>java.lang.Exception</exception-type>
		<location>/error.jsf</location>
	</error-page>
	<security-constraint>
		<display-name>Forbidden resource</display-name>
		<web-resource-collection>
			<web-resource-name>Forbidden</web-resource-name>
			<url-pattern>*.xhtml</url-pattern>
			<url-pattern>/layout/*</url-pattern>
			<url-pattern>/resources/tools/*</url-pattern>
		</web-resource-collection>
		<auth-constraint>
			<description>Thou shall not read the sources or use utils directly
			</description>
		</auth-constraint>
		<user-data-constraint>
			<transport-guarantee>CONFIDENTIAL</transport-guarantee>
		</user-data-constraint>
	</security-constraint>
	<login-config>
		<auth-method>FORM</auth-method>
		<realm-name>moyaRealm</realm-name>
		<form-login-config>
			<form-login-page>/auth/login.jsf</form-login-page>
			<form-error-page>/auth/loginError.jsf</form-error-page>
		</form-login-config>
	</login-config>
	<filter>
		<filter-name>Pretty Filter</filter-name>
		<filter-class>com.ocpsoft.pretty.PrettyFilter</filter-class>
		<async-supported>true</async-supported>
	</filter>
	<filter-mapping>
		<filter-name>PrimefacesFileupload</filter-name>
		<servlet-name>Faces Servlet</servlet-name>
	</filter-mapping>
	<filter-mapping>
		<filter-name>Pretty Filter</filter-name>
		<url-pattern>/*</url-pattern>
		<dispatcher>FORWARD</dispatcher>
		<dispatcher>REQUEST</dispatcher>
		<dispatcher>ERROR</dispatcher>
		<dispatcher>ASYNC</dispatcher>
	</filter-mapping>
</web-app>