title: Spring Security targetUrlParameter does not redirect
body: <p>I'm trying to redirect the user back to the page where they clicked the login link. (Pages are read-only for non-authenticated users, but writable for logged in users.) How do I redirect the user back to where they came from after they login?</p>
  
  <p>I'm sending to the user to the login page with this link: <code>/spring_security_login?redirect=/item5</code>. After loging in, I expect the user to be redirected to <code>/item5</code> page. However, they're always redirected to <code>/</code> page.</p>
  
  <p>Here is the configuration I'm using:</p>
  
  <pre><code>&lt;http use-expressions="true"&gt;
      &lt;intercept-url pattern="/**" access="permitAll" /&gt;
      &lt;form-login authentication-success-handler-ref="simpleUrlAuthenticationSuccessHandler"/&gt;
  &lt;/http&gt;
  &lt;beans:bean id="simpleUrlAuthenticationSuccessHandler"
      class="org.springframework.security.web.authentication.SimpleUrlAuthenticationSuccessHandler"&gt;
      &lt;beans:property name="defaultTargetUrl" value="/"/&gt;
      &lt;beans:property name="targetUrlParameter" value="redirect"/&gt;
  &lt;/beans:bean&gt;
  </code></pre>
  
  <p>It seems that <code>targetUrlParameter</code> is not getting picked up as expected. I'm using Spring Security 3.1.4</p>