"Fossies" - the Fresh Open Source Software Archive

Member "WEB-INF/web.xml" (22 Jul 2020, 3520 Bytes) of package /linux/www/fcrepo-webapp-5.1.1.war:


As a special service "Fossies" has tried to format the requested source page into HTML format using (guessed) XML source code syntax highlighting (style: standard) with prefixed line numbers. Alternatively you can here view or download the uninterpreted source code file.

    1 <?xml version="1.0" encoding="UTF-8"?>
    2 
    3 <web-app 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_3_0.xsd"
    6     version="3.0">
    7 
    8     <display-name>Fedora Repository</display-name>
    9 
   10     <context-param>
   11         <param-name>contextConfigLocation</param-name>
   12         <param-value>WEB-INF/classes/spring/repository.xml</param-value>
   13     </context-param>
   14   
   15   <context-param>
   16     <param-name>shiroEnvironmentClass</param-name>
   17     <param-value>org.apache.shiro.web.env.DefaultWebEnvironment</param-value>
   18   </context-param>
   19     
   20   <listener>
   21     <listener-class>org.apache.shiro.web.env.EnvironmentLoaderListener</listener-class>
   22   </listener>
   23 
   24   <!-- To allow request object to be wired to WebACAuthorizingRealm -->
   25   <listener>
   26     <listener-class>
   27       org.springframework.web.context.request.RequestContextListener
   28     </listener-class>
   29   </listener>
   30 
   31   <!-- The filter-name matches name of a 'shiroFilter' bean inside applicationContext.xml -->
   32   <filter>
   33       <filter-name>shiroFilter</filter-name>
   34       <filter-class>org.springframework.web.filter.DelegatingFilterProxy</filter-class>
   35       <init-param>
   36           <param-name>targetFilterLifecycle</param-name>
   37           <param-value>true</param-value>
   38       </init-param>
   39   </filter>
   40 
   41 
   42     <listener>
   43         <listener-class>org.fcrepo.http.commons.FedoraContextLoaderListener</listener-class>
   44     </listener>
   45 
   46   <servlet>
   47     <servlet-name>jersey-servlet</servlet-name>
   48     <servlet-class>org.glassfish.jersey.servlet.ServletContainer</servlet-class>
   49 
   50     <init-param>
   51       <param-name>javax.ws.rs.Application</param-name>
   52       <param-value>org.fcrepo.http.commons.FedoraApplication</param-value>
   53     </init-param>
   54 
   55     <load-on-startup>1</load-on-startup>
   56   </servlet>
   57 
   58   <servlet-mapping>
   59         <servlet-name>jersey-servlet</servlet-name>
   60         <url-pattern>/rest/*</url-pattern>
   61 
   62     </servlet-mapping>
   63 
   64   <filter>
   65     <filter-name>ETagFilter</filter-name>
   66     <filter-class>org.springframework.web.filter.ShallowEtagHeaderFilter</filter-class>
   67   </filter>
   68 
   69   <!-- Make sure any request you want accessible to Shiro is filtered. /* catches all -->
   70   <!-- requests.  Usually this filter mapping is defined first (before all others) to -->
   71   <!-- ensure that Shiro works in subsequent filters in the filter chain:             -->
   72   <filter-mapping>
   73       <filter-name>shiroFilter</filter-name>
   74       <url-pattern>/*</url-pattern>
   75   </filter-mapping>
   76 
   77   <filter-mapping>
   78     <filter-name>ETagFilter</filter-name>
   79     <url-pattern>/static/*</url-pattern>
   80   </filter-mapping>
   81 
   82   <!--Uncomment section below to enable Basic-Authentication-->
   83   <security-constraint>
   84     <web-resource-collection>
   85       <web-resource-name>Fedora4</web-resource-name>
   86       <url-pattern>/*</url-pattern>
   87       <http-method>DELETE</http-method>
   88       <http-method>PUT</http-method>
   89       <http-method>HEAD</http-method>
   90       <http-method>OPTIONS</http-method>
   91       <http-method>PATCH</http-method>
   92       <http-method>GET</http-method>
   93       <http-method>POST</http-method>
   94     </web-resource-collection>
   95     <auth-constraint>
   96       <role-name>fedoraUser</role-name>
   97       <role-name>fedoraAdmin</role-name>
   98     </auth-constraint>
   99     <user-data-constraint>
  100       <transport-guarantee>NONE</transport-guarantee>
  101     </user-data-constraint>
  102   </security-constraint>
  103 
  104   <login-config>
  105     <auth-method>BASIC</auth-method>
  106     <realm-name>fcrepo</realm-name>
  107   </login-config>
  108 
  109 
  110 </web-app>