0

I'm trying to redirect to the page (which needed user authentication) after login. The first page needs user authentication and I have this annotation:

@AuthenticationPolicy(AuthenticationPolicyType.AUTHENTICATED_USERS)

This redirects me to the LoginPage, and after that, to the Index:

    Object onSuccess() {

    userSession = new UserSession();
   ....
   ....       
    return Index.class;
}

I want to redirect to the page where i wanted to go and being logged. What can I do?

alexpenedo
  • 27
  • 7
  • Your question is not clear. Which page you are loading fist and where you are redirecting to after that? – Chaitanya Jan 12 '14 at 19:38
  • @user2065083 I have a page for Place a bid, and this page needs user authentication, so when I click in "Place bid button" that redirects me to the Login Page. After Login page return to the Index page but I want to return to the page for Place a bid. Do you understand me? – alexpenedo Jan 12 '14 at 19:43
  • Please check this post: [Spring Security redirect to previous page after successful login][1], possible duplicate of this post. [1]: http://stackoverflow.com/questions/14573654/spring-security-redirect-to-previous-page-after-succesful-login – Chaitanya Jan 12 '14 at 19:58

0 Answers0