title: Spring Security with AJAX authentication
body: <p>I am trying to use <em>Spring security</em> to authenticate a web application to protected resources using AJAX, as in, a popup dialog rather than the default redirect to a separate login form. However I am having real trouble getting my noggin around this problem. I have tried to implement a test based on the contents of the following URL:</p>
  
  <p><a href="http://www.cavalr.com/blog/Spring_MVC_-_Spring_Security_with_AJAX_and_JSON" rel="nofollow">http://www.cavalr.com/blog/Spring_MVC_-_Spring_Security_with_AJAX_and_JSON</a></p>
  
  <p>But to no avail - the dialog remains open and the controller is not called.</p>
  
  <p>I have read conflicting information that says the AJAX URL must <code>POST</code> to <code>j_spring_security_check</code> and that it will expect the login and password form components to be named according to Spring security's requirements.</p>
  
  <p>Can someone clarify this for me?</p>