Hope I am not wrong, request.getRequestURI() and request.requestURL() tells you what was requested by the user but not who requested it (ie the origin of the requester). Lets say if your webapplication is routed from Google then, I want to know that the url of Google, not requested URL ie your application url
I think I didn't explain the problem properly.. Let me explain it again
I am implementing a Login Service for my application. Some times users may choose the page from public domain directly. So I want to capture that url initially and the request is directed to Login page. When user login is successful then I want to redirect him with the page what he requested earlier.
I can keep the originally requested url in session and I can redirect to it once the user successful in login.. This is temporary solution
Is there any other solution which dont uses session/cookie/url rewriting