Author | Message |
---|---|
tpatel11
Posts: 12
|
Posted 16:38 Aug 15, 2015 |
Hello Dr. Sun, When I implement spring security in my project,after clicking Login button I got 403 error(HTTP Status 403 - Invalid CSRF Token 'null' was found on the request parameter '_csrf' or header 'X-CSRF-TOKEN'.) I have used custom login form.
|
cysun
Posts: 2935
|
Posted 16:39 Aug 15, 2015 |
Add this to your login form:
|
tpatel11
Posts: 12
|
Posted 16:44 Aug 15, 2015 |
I have tried this one..then ?I got 404-/csjobs-exam/j_spring_security_check type Status report message /csjobs-exam/j_spring_security_check description The requested resource is not available. |
cysun
Posts: 2935
|
Posted 16:46 Aug 15, 2015 |
The login URL for newer versions of Spring Security is login, not j_spring_security_check (did you watch the lecture or just recycled some old code?). |
tpatel11
Posts: 12
|
Posted 16:49 Aug 15, 2015 |
before doing this I tried as shown in video..but i didn't work either..but I am going to try it again thank you |
tpatel11
Posts: 12
|
Posted 16:55 Aug 15, 2015 |
HTTP Status 404 - /login type Status report message /login description The requested resource is not available. I have written action="/login" then I got this..shall I post login.jsp here? Thank you
|
cysun
Posts: 2935
|
Posted 16:56 Aug 15, 2015 |
See this. |