I have two page:
@AuthorizeInstantiation(Roles.ADMIN)
public class AdminPage extends BasePage {
...
@AuthorizeInstantiation(Roles.USER)
public class UserPage extends BasePage {
...
when there isnt any user logged in then he is redirected to login page. Is there some option how to get redirection page ? So if user go to admin page then login page println admin page. If user go to user page then login page println user page and when user go just login page then login page println null
UPDATE:
strategy when you go to protected page
getApplicationSettings().setAccessDeniedPage(LoginPage.class);
what isnt clear enought ? when user want to get to UserPage or AdminPage he is regirected to LoginPage. And I want to println in loginPage which page it was
OK I got it:
I create unauthorizedComponentInstantiationListener:
and setting variable in appliaction.
Then just in login page I call
Application.getRedirectionPage()so I know which page it was