I am allowing user to log in in my JSP site. But when he gets logged in he/she gets redirected to the home page.
So I want him to remain on the same page instead of getting redirected to some specific location.
So I want to access the link of the source page which initiated login/logout request, so that I will logout the user and then redirect to the same page. I will also need to access the querystring.
I tried request.getRequestURL/URL, but they return the link that is used to reach this servlet (i.e. actually LoginHendlerServlet link itself) not the link of the page on which login button is clicked.
Is there any ready-made API method to access this one older link.