Skip to content
Snippets Groups Projects
web.xml 3.35 KiB
<?xml version="1.0" encoding="UTF-8"?>
<web-app version="3.0" xmlns="http://java.sun.com/xml/ns/javaee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_3_0.xsd">
    
    <!-- This parameter determines that the state is saved on the server. -->
    <context-param>
        <param-name>javax.faces.STATE_SAVING_METHOD</param-name>
        <param-value>server</param-value>
    </context-param>
    
    <!-- This parameter determines the current stage of the project. -->
    <context-param>
        <param-name>javax.faces.PROJECT_STAGE</param-name>
        <param-value>Development</param-value>
    </context-param>

    <!-- This parameter makes sure that the theme chooser will work. -->
    <context-param>
        <param-name>primefaces.THEME</param-name>
        <param-value>#{currentConfigurationBean.lookAndFeel}</param-value>
    </context-param>
    
    <!-- This filter is necessary for the PrimeFaces file upload. -->
    <filter>
        <filter-name>PrimeFaces FileUpload Filter</filter-name>
        <filter-class>org.primefaces.webapp.filter.FileUploadFilter</filter-class>
        <init-param>
            <param-name>thresholdSize</param-name>
            <param-value>51200</param-value>
        </init-param>
    </filter>
    
    <filter-mapping>
        <filter-name>PrimeFaces FileUpload Filter</filter-name>
        <url-pattern>/*</url-pattern>
    </filter-mapping>
    
    <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>/faces/*</url-pattern>
    </servlet-mapping>
    
    <session-config>
        <session-timeout>
            30
        </session-timeout>
    </session-config>
    
    <welcome-file-list>
        <welcome-file>faces/ProjectOverview.xhtml</welcome-file>
    </welcome-file-list>
    
    <listener>
        <listener-class>com.sun.faces.config.ConfigureListener</listener-class> 
    </listener>
    
    <!-- This filter will be used by Pretty Filter.-->
    <filter>
        <filter-name>Pretty Filter</filter-name>
        <filter-class>com.ocpsoft.pretty.PrettyFilter</filter-class>
    </filter>

    <filter-mapping> 
        <filter-name>Pretty Filter</filter-name> 
        <url-pattern>/*</url-pattern> 
        <dispatcher>FORWARD</dispatcher> 
        <dispatcher>REQUEST</dispatcher> 
        <dispatcher>ERROR</dispatcher>
    </filter-mapping>
    
    <!-- The following is necessary for Apache Shiro. -->
    <listener>
        <listener-class>org.apache.shiro.web.env.EnvironmentLoaderListener</listener-class>
    </listener>

    <filter>
        <filter-name>ShiroFilter</filter-name>
        <filter-class>org.apache.shiro.web.servlet.ShiroFilter</filter-class>
    </filter>

    <filter-mapping>
        <filter-name>ShiroFilter</filter-name>
        <url-pattern>/*</url-pattern>
        <dispatcher>REQUEST</dispatcher> 
        <dispatcher>FORWARD</dispatcher> 
        <dispatcher>INCLUDE</dispatcher> 
        <dispatcher>ERROR</dispatcher>
    </filter-mapping>
    
    <listener>
        <listener-class>kieker.webgui.common.EnvironmentLoaderListener</listener-class>
    </listener>
</web-app>