title: Spring Security - How can I specify anonymous role to root page
body: <p>The default URL for my web app is <a href="http://localhost:8080/Icd/" rel="nofollow">http://localhost:8080/Icd/</a></p>
  
  <p>I want to display my custom login page which is /index.jsp.</p>
  
  <p>However , when I configure the spring security to do so , I am getting too many redirects problem .  Below the code present in the security.xml file . </p>
  
  <p>Let me know if I am missing something .</p>
  
  <pre><code>&lt;security:http auto-config="true" &gt;
  
        &lt;security:intercept-url pattern="/" access="ROLE_ANONYMOUS" /&gt;
       &lt;security:intercept-url pattern="/*" access="ROLE_USER" /&gt;
       &lt;security:form-login login-page="/index.jsp" /&gt;
  &lt;/security:http&gt;
  &lt;security:authentication-provider&gt;
      &lt;security:user-service&gt;
          &lt;security:user name="david" password="david" authorities="ROLE_USER,ROLE_ADMIN" /&gt;
          &lt;security:user name="alex" password="alex" authorities="ROLE_USER" /&gt;
      &lt;/security:user-service&gt;
  &lt;/security:authentication-provider&gt;
  </code></pre>