我想在我的托管bean的动作侦听器中获取绝对URL。我用过:如何在JSF中使用查询字符串获取当前绝对URL?
HttpServletRequest#getRequestURL() // returning http://localhost:7101/POSM/pages/catalog-edit
HttpServetRequest#getQueryString() // returning _adf.ctrl-state=gfjk46nd7_9
但是实际的网址是:http://localhost:7101/POSM/pages/catalog-edit?_adf.ctrl-state=gfjk46nd7_9&articleReference=HEN00067&_afrLoop=343543687406787
。我不知道为什么参数artcileReference
被省略。
有什么方法可以一次给我整个URL吗?我如何获得所有查询字符串的整个网址?
答案很简单:第 –
复杂的答案,有些猴子编码:) –