]> source.dussan.org Git - archiva.git/commitdiff
Switching to context param for dirlist deactivation
authorMartin Schreier <martin_s@apache.org>
Fri, 7 Jan 2022 20:37:04 +0000 (21:37 +0100)
committerMartin Schreier <martin_s@apache.org>
Fri, 7 Jan 2022 20:37:04 +0000 (21:37 +0100)
archiva-modules/archiva-web/archiva-webapp/src/main/webapp/WEB-INF/web.xml

index fd5bea2d70dd597128730bbe151766d6e4c877a3..b55783c8dc3f0e0c4f0bfb66a6c862d802b259c6 100644 (file)
     <param-value>/sirona-monitoring</param-value>
   </context-param>
 
+  <!-- Deactivate directory listing of jetty servlet -->
+  <context-param>
+    <param-name>org.eclipse.jetty.servlet.Default.dirAllowed</param-name>
+    <param-value>false</param-value>
+  </context-param>
+
   <filter>
     <filter-name>encodingFilter</filter-name>
     <filter-class>org.springframework.web.filter.CharacterEncodingFilter</filter-class>
     <url-pattern>/restServices/*</url-pattern>
   </servlet-mapping>
 
-  <!-- Removing dir-listing from Jetty default-servlet -->
-  <servlet>
-    <servlet-name>default</servlet-name>
-    <servlet-class>org.eclipse.jetty.servlet.DefaultServlet</servlet-class>
-    <init-param>
-      <param-name>dirAllowed</param-name>
-      <param-value>false</param-value>
-    </init-param>
-    <load-on-startup>0</load-on-startup>
-  </servlet>
-
   <welcome-file-list>
     <welcome-file>index.html</welcome-file>
   </welcome-file-list>