title: Spring MVC + Tiles + Spring Security = The requested resource is not available
body: <p>I have to say the equation in the title drives me crazy. As soon as I add the DelegatingFilterProxy to web.xml I get the 'Error 404 The requested resource is not available'. Otherwise the web app works fine. I am sure the problem with my configuration but I just cannot figure out. Also I am a beginner in Spring Security...</p>
  
  <p>web.xml</p>
  
  <pre><code>&lt;/web-app ...&gt;
      &lt;listener&gt;
          &lt;listener-class&gt;org.springframework.web.context.ContextLoaderListener&lt;/listener-class&gt;
      &lt;/listener&gt;
      &lt;context-param&gt;
          &lt;param-name&gt;contextConfigLocation&lt;/param-name&gt;
          &lt;param-value&gt;
              /WEB-INF/spring/security-context.xml
              /WEB-INF/SpringMVC-servlet.xml
          &lt;/param-value&gt;
      &lt;/context-param&gt;
  
      &lt;filter&gt;
          &lt;filter-name&gt;SpringSecurityFilterChain&lt;/filter-name&gt;
          &lt;filter-class&gt;org.springframework.web.filter.DelegatingFilterProxy&lt;/filter-class&gt;
      &lt;/filter&gt;
      &lt;filter-mapping&gt;
          &lt;filter-name&gt;SpringSecurityFilterChain&lt;/filter-name&gt;
          &lt;url-pattern&gt;/*&lt;/url-pattern&gt;
      &lt;/filter-mapping&gt;
  
      &lt;servlet&gt;
          &lt;servlet-name&gt;SpringMVC&lt;/servlet-name&gt;
          &lt;servlet-class&gt;org.springframework.web.servlet.DispatcherServlet&lt;/servlet-class&gt;
          &lt;load-on-startup&gt;1&lt;/load-on-startup&gt;
      &lt;/servlet&gt;
      &lt;servlet-mapping&gt;
          &lt;servlet-name&gt;SpringMVC&lt;/servlet-name&gt;
          &lt;url-pattern&gt;/&lt;/url-pattern&gt;
      &lt;/servlet-mapping&gt;
  &lt;/web-app&gt;
  </code></pre>
  
  <p>security-context.xml</p>
  
  <pre><code>&lt;b:beans xmlns:b="http://www.springframework.org/schema/beans" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://www.springframework.org/schema/security" xsi:schemaLocation="http://www.springframework.org/schema/security http://www.springframework.org/schema/security/spring-security.xsd http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-3.0.xsd"&gt;
      &lt;http auto-config="true"&gt;
          &lt;intercept-url pattern="/**" access="permitAll"/&gt;
      &lt;/http&gt;
  
      &lt;authentication-manager&gt;
          &lt;authentication-provider&gt;
              &lt;user-service&gt;
                  &lt;user name="user" password="password" authorities="ROLE_USER" /&gt;
                  &lt;user name="admin" password="password" authorities="ROLE_USER,ROLE_ADMIN"/&gt;
              &lt;/user-service&gt;
          &lt;/authentication-provider&gt;
      &lt;/authentication-manager&gt;
  &lt;/b:beans&gt;
  </code></pre>
  
  <p>SpringMVC-servlet.xml</p>
  
  <pre><code>&lt;beans xmlns="http://www.springframework.org/schema/beans"
      xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
      xmlns:context="http://www.springframework.org/schema/context"
      xmlns:mvc="http://www.springframework.org/schema/mvc"
      xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd
                          http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context-3.1.xsd 
                          http://www.springframework.org/schema/mvc http://www.springframework.org/schema/mvc/spring-mvc-3.1.xsd"&gt;
  
      &lt;import resource="spring/management-app-context.xml"/&gt;
  
      &lt;mvc:annotation-driven/&gt;
  
      &lt;context:component-scan base-package="org.protneut.server.management.controller" /&gt;
  
      &lt;mvc:resources mapping="/resources/**" location="/WEB-INF/resources/"/&gt;
      &lt;mvc:resources mapping="/jsp/**" location="/WEB-INF/jsp/"/&gt;
      &lt;mvc:default-servlet-handler /&gt;
  
      &lt;bean id="viewResolver" class="org.springframework.web.servlet.view.tiles3.TilesViewResolver"/&gt;
  
      &lt;bean id="tilesConfigurer" class="org.springframework.web.servlet.view.tiles3.TilesConfigurer"&gt;
          &lt;property name="definitions"&gt;
              &lt;list&gt;
                  &lt;value&gt;/WEB-INF/tiles/tiles-definitions.xml&lt;/value&gt;
              &lt;/list&gt;
          &lt;/property&gt;
      &lt;/bean&gt; 
  &lt;/beans&gt;
  </code></pre>
  
  <p>So if I comment out the SpringSecurityFilterChain the app is working fine.<br>
  Also I cannot find any log in the app server's log file when trying to open the <a href="http://localhost:8080/management-app/administration/service/main" rel="nofollow">http://localhost:8080/management-app/administration/service/main</a> (that is my URL)</p>
  
  <p>Could somebody help me what is wrong?<br>
  Thank you in advance!</p>
  
  <p>Regards,<br>
  V.</p>