<?xml version="1.0" encoding="UTF-8"?>
<web-app xmlns="http://xmlns.jcp.org/xml/ns/javaee"
         xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
         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>HIRS Attestation CA Portal</display-name>

    <welcome-file-list>
        <welcome-file>index.jsp</welcome-file>
    </welcome-file-list>

    <!-- Specify the location of the LOG4J file -->
    <context-param>
        <param-name>log4j.configurationFile</param-name>
        <param-value>classpath:log4j2-spring.xml</param-value>
    </context-param>

    <!--
        Dispatches page requests via PageConfiguration to PageControllers
    -->
    <servlet>
        <servlet-name>pages</servlet-name>
        <servlet-class>org.springframework.web.servlet.DispatcherServlet</servlet-class>
        <init-param>
            <param-name>contextClass</param-name>
            <param-value>org.springframework.web.context.support.AnnotationConfigWebApplicationContext</param-value>
        </init-param>
        <multipart-config>
            <location>/tmp</location>
            <max-file-size>28393832</max-file-size>
            <max-request-size>482818342</max-request-size>
            <file-size-threshold>1031234</file-size-threshold>
        </multipart-config>
    </servlet>
    <servlet-mapping>
        <servlet-name>pages</servlet-name>
        <url-pattern>/portal/*</url-pattern>
    </servlet-mapping>

    <listener>
        <listener-class>hirs.attestationca.portal.HIRSDbInitializer</listener-class>
    </listener>
    <error-page>
        <location>/errors</location>
    </error-page>


</web-app>
