Hello All,
I have a Spring +
Struts web application and I am using the Spring Acegi for user authentication. I have a login link in a
jsp which is embedded into in a base tile and this link appears on all pages in the webapp.
My original problem was to redirect the user to the same page where he was in, after successful login. With Acegi, i had to override the successfulAuthentication method in the AuthenticationProcessingFilter to retrieve the requestUrl from the session attribute and redirect to this url after successful login.
I tried setting the original request url in my user login jsp and also in the Struts Action for the userlogin. But the problem is, i am not able to get the original request url (the one which is displayed in the address bar of the browser) with the request.getRequestURL method because this method returns the url of the base tile.
I already did a lot of searching for this topic, found some solutions discussed, but they require changing all the actions that could be invoked from the webapp, to store the request url into the session attribute
This looks like a common issue for webapps which want to redirect the user to the page he was in previously before logging in. Is there a easy solution to this problem?
Regards,
Reghu