title: How to use custom filter with authentication-success-handler-ref equivalent in spring security
body: <p>I want to pass some parameters with login details to spring security such as some item id.
  then after i want to redirect to page according to the user type.
  For this i am using <strong>custom filter</strong> to send additional parameter.
  And to redirection i am using <strong>authentication-success-handler-ref</strong>.
  My problem is, I am geting position conflict as i am using <strong></strong> along with <strong>custom filter</strong>.
  Please help me out to do my task.</p>
  
  <p>Here is my configuration</p>
  
  <pre><code>&lt;http   use-expressions="true"&gt;
          &lt;intercept-url pattern="/login" access="permitAll" /&gt;
          &lt;intercept-url pattern="/resources/**" access="permitAll" /&gt;
          &lt;intercept-url pattern="/logout" access="permitAll" /&gt;
          &lt;intercept-url pattern="/accessdenied" access="permitAll" /&gt;
  
         &lt;custom-filter ref="ddAuthenticationFilter" position="FORM_LOGIN_FILTER" /&gt;
          &lt;form-login authentication-failure-url="/accessdenied" 
          authentication-success-handler-ref="ddAuthenticationSuccessHandler"/&gt;
  
  
  
      &lt;/http&gt;
  
      &lt;beans:bean id="ddAuthenticationFilter" class="com.dd.security.ExUsernamePasswordAuthenticationFilter"/&gt;
  
      &lt;beans:bean id="ddAuthenticationSuccessHandler" class="com.dd.security.DDAuthenticationSuccessHandler" /&gt;
  </code></pre>