title: Authentication failed in Spring due to no mapping found for HTTP request with URI?
body: <p>I have a web project using Spring Security. The user begin from login.jsp, pass through the authentication, and direct to hello.jsp. Take note that all JSP pages are locate in WEB-INF. During the process, I notice the URL begin with <code>localhost:8081/Project1/pages/login.jsp</code>, right after submit the page, the URL have change to  <code>http://localhost:8081/Project1/pages/j_spring_security_check;jsessionid=792884C463EAC3C6CBC155EA75F4C6E4</code>. </p>
  
  <p>And then the page showing me HTTP status 404 after the authentication instead of showing hello.jsp. In the console output, I see this message:</p>
  
  <p><code>WARNING: No mapping found for HTTP request with URI [/SpringSecurity3/pages/j_spring_security_check] in DispatcherServlet with name 'SpringSecurity3'</code></p>
  
  <p>I am not sure what is miss configure in Spring configuration? The configuration code is as follow:</p>
  
  <pre><code>&lt;http auto-config="true"&gt;
     &lt;intercept-url pattern="/welcome*" access="ROLE_ADMIN"/&gt;
     &lt;intercept-url pattern="/pages/hello.jsp" access="ROLE_ADMIN"/&gt;
     &lt;form-login login-page="/login" default-target-url="/welcome" authentication-failure-url="/loginfailed" /&gt;
     &lt;logout logout-success-url="/pages/login.jsp"/&gt;
  &lt;/http&gt;
  </code></pre>
  
  <p>and my web.xml is as follow:</p>
  
  <pre><code>&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;filter-mapping&gt;
      &lt;filter-name&gt;springSecurityFilterChain&lt;/filter-name&gt;
      &lt;url-pattern&gt;/WEB-INF/pages/*&lt;/url-pattern&gt;
  &lt;/filter-mapping&gt;
  </code></pre>