Reputation: 4504
I have scenario like login page where when the user access any privileged page, it should redirect to login page and after login it should get redirected back to the original page. I can pass the original page as query parameter. However how can redirect to the original page from the LoginAction class?
Upvotes: 1
Views: 1573
Reputation: 692231
Either use response.sendRedirect()
and return null from your action, or return an instance of ActionRedirect from your action.
Upvotes: 2