I have a page with several links to other pages of the application. When a user visits a website, a system page is displayed that is accessible even if the user is not logged in. However, if the user clicks on some other link that expects the user to log in, the user will be correctly redirected to the login page. However, after logging in, the user is not redirected to the link that was clicked, instead the user goes to to the system page (the system page is the default destination URL).
Here is a snippet from the spring configuration file -
<logout logout-url="/logout"
logout-success-url="/login"
invalidate-session="true" />
<form-login login-page="/login"
login-processing-url="/j_security_check"
always-use-default-target="false"
authentication-failure-url="/login?failure=true"
username-parameter="username"
password-parameter="password"/>
I tried using the property authentication-success-handler-refto refer to the instance SavedRequestAwareAuthenticationSuccessHandler, however that didn't work either.
Any inputs?
source
share