title: Spring Security - Dispatch to /j_spring_security_check
body: <p>I have spring security in place and login via login.jsp works perfectly fine.</p>
  
  <p>Now, I have to automatically get the user logged in based on the URL (similar to Single Sign On). I basically have a path parameter in the URL which is basically an encrypted code, I process this code to do an auto login.</p>
  
  <p>I am modifying my LoginController to check if I have a valid path param using which I get my username &amp; password, using this username &amp; password I am doing <code>"forward:/j_spring_security_check?j_username="+username+"&amp;j_password="+password</code></p>
  
  <p>This directs me to login.jsp with following error <code>Your login attempt was not successful, try again. Caused : Authentication method not supported: GET</code></p>
  
  <p>I have also tried with <code>"redirect:/j_spring_security_check?j_username="+username+"&amp;j_password="+password</code> but with no help.</p>
  
  <p>Call to <code>/j_spring_security_check</code> is a <code>POST</code> but <code>forward:</code> &amp; <code>redirect:</code> is doing a <code>GET</code>, so how can I dispatch to <code>/j_spring_security_check</code> as <code>POST</code> from my LoginController?</p>
  
  <p>Thanks</p>