All my $.ajax
, both POST
and GET
were working fine, but as soon as I integrated Spring security 3.2.6
into my project the
There is one more situation that must be consulted specially when you are implementing spring security 4, one needs form button (not "a href").
https://spring.io/blog/2013/08/21/spring-security-3-2-0-rc1-highlights-csrf-protection/#ajax-requests.
A> form post request sent: input type hidden in both login/logout buttons
B> For AJAX post request add following in your JSP page after taglib declarations.
and some where above closing body tag in jsp any where as it "on ready"
It should work! if you have CORS issues still remaining, see article below. http://www.html5rocks.com/en/tutorials/cors/