I have spring security in place and login via login.jsp works perfectly fine.
Now, I have to automatically get the user logged in based on the URL (similar to Single
/j_spring_security_check URL is mapped to UsernamePasswordAuthenticationFilter to serve the requests.
In UsernamePasswordAuthenticationFilter, by default, the postOnly is set to true.
The following change in spring-security.xml which sets postOnly to false worked.
Also, in web.xml, the following configuration is required:
springSecurityFilterChain
/*
REQUEST
FORWARD