如何获得以前的网址? [英] How to get previous URL?
本文介绍了如何获得以前的网址?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我需要从中调用我的Web应用程序的URL. 例如:-如果有从stackoverflow.com到我的站点foo.com的链接,则我需要Web应用程序(托管Bean)中的stackoverflow链接.
I need the URL from which 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.
这篇关于如何获得以前的网址?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文