I need the URL from wh开发者_JS百科ich my web app is called. For eg:- If there is a link to my site foo.com from stackoverflow.com, I need the stackoverflow link in web app(managed bean).
All helps appreciated, thanks.
Not always filled, but you can use:
HttpServletRequest.getHeader("Referer");
Note: The spelling error is on purpose. For an explanation see here.
By checking the HTTP Referrer you can see from which site the request for your site originated.
精彩评论