Skip to main content

Redirect to a url after login - Spring Security


If you want the browser to remember the url that you enter before login and redirect to that url after you login to the application. 

  • XML Configuration - spring-security.xml
 

    • What happens after login will be handled by AuthenticationSuccessHandler
    • SavedRequestAwareAuthenticationSuccessHandler will use the saved request stored in the session. After the successfull login the user will be redirected to the original request url.

Comments