title: Redirect loop in Spring Security app
body: <p>I am developing a Spring MVC / Spring Security application.</p>
  
  <p>I do not have any exceptions or errors, but there is a redirect loop on one of the pages.</p>
  
  <p>I'm using Spring 3.0.1 and Spring Security 3.0.1.</p>
  
  <p>My <code>dispatcher-security.xml</code>:</p>
  
  <pre><code>&lt;beans xmlns="http://www.springframework.org/schema/beans"
     xmlns:security="http://www.springframework.org/schema/security"
     xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
     xsi:schemaLocation="http://www.springframework.org/schema/beans
     http://www.springframework.org/schema/beans/spring-beans-3.0.xsd
     http://www.springframework.org/schema/security
     http://www.springframework.org/schema/security/spring-security-3.0.xsd"&gt;
  
     &lt;security:http auto-config="true" use-expressions="true"&gt; 
        &lt;security:form-login login-page="/login" default-target-url="/login" authentication-failure-url="/fail2login"/&gt; 
        &lt;security:logout logout-success-url="/"/&gt; 
        &lt;security:intercept-url pattern="/auth/**" access="hasRole('ANONYMOUS')" /&gt; 
        &lt;security:intercept-url pattern="/js/**" access="hasRole('ANONYMOUS')" /&gt; 
        &lt;security:intercept-url pattern="/css/**" access="hasRole('ANONYMOUS')" /&gt; 
        &lt;security:intercept-url pattern="/**" access="hasRole('ADMIN')" /&gt; 
     &lt;/security:http&gt;
  
     &lt;security:authentication-manager&gt;  
        &lt;security:authentication-provider&gt;  
           &lt;security:jdbc-user-service data-source-ref="dataSource1"
             users-by-username-query=" select name,password,enabled from user where name=?"      
             authorities-by-username-query="select u.name, r.role from user u, role r where u.role = r.auto_id and u.name =?  "
           /&gt;
        &lt;/security:authentication-provider&gt;  
     &lt;/security:authentication-manager&gt;
  
  &lt;/beans&gt;
  </code></pre>
  
  <p>Please help me......</p>