I did a lot of testing trying to make it work using context mapping example:
Using a RequestMapping path:
Also in the security spring
at the web xml
Also what happened as well is that : at the form login in the security spring (check second image) file at the property login processing url instead of using the j_spring_security_check I used the login path, doing this I have solved the problem at the authentication part when entering the credentials it was always moving to the authentication failure url.
Keep in mind also we have to change the login page at the form tag and attribute attribute, I had to indicate as well using the login path.
Take a look in the previous image and it shows the login form using the input tags but named in the wrong way, leave it as it is it won't login as expected, the spring login form expects to receive the following names instead:
If we don't specify what is our custom login page, every time someone try to hit a page the does require login, it will redirect to the default login spring page instead of our custom. To fix this we need to specify the following in the security file:
No comments:
Post a Comment