Here in the company it is common to pass news links from the portal to others via email, but when the user opens the link he asks for authentication in the system, but after logging in he is redirected to the home page (index.jsf) and not to the news that he wanted to access.
This happens because the
shiro
is configured, for whenever any user logs in, is redirected to the pageindex.jsf
. You need a treatment that captures the URL that will be accessed and stores it until the user authenticates. One idea (I don’t think it’s the right one) is that you pass this URL to the login bean itself, and when you finish the whole authentication process, you perform a forced redirect to the requested URL.– Weslley Tavares
The point is that I haven’t found (yet) a way to get this URL that the user accessed and save it until the authentication is performed.
– Jhonatan Mota
A
getRequestURL()
doesn’t solve?– Weslley Tavares