I have developed a Spring application and I implement Spring security integration to Login and Logout function in it. I used Spring security with xml configuration. But when I l
Try changing your servlet mappings in your web xml to this:
<servlet-mapping>
<servlet-name>appServlet</servlet-name>
<url-pattern>/*</url-pattern>
</servlet-mapping>
<filter-mapping>
<filter-name>springSecurityFilterChain</filter-name>
<url-pattern>/*</url-pattern>
</filter-mapping>
Below code solved my problem for annotation based security configuration. http.formLogin().loginProcessingUrl("/j_spring_security_check")...other settings
I finally solved this by modifying the line where I was declaring my custom login form page.
Added processing-url="/j_spring_security_check":
<form-login login-page="/login" default-target-url="/admin" login-processing-url="/j_spring_security_check" authentication-failure-url="/login?error" username-parameter="username" password-parameter="password"/>
to my security-context.xml page