将当前浏览器的url地址传递给bean

时间:2017-09-06 01:45:35

标签: javascript jsf

我想将浏览器的url地址发送给bean,我发现了这个

A = { [A1] [A2] [A3] ... [An] }

我没有获得正确的浏览器地址,因此我将使用javasript data.frame(year=as.character(c("1997","1997","1997","1997","1997","1997","1998","1998")), season=as.character(c("W", "W","W","D","D","D","W","W")), result=as.character(c("Y", "Y","N","N","Y","N","N","N"))) %>% group_by(year, season) %>% summarise(psit_freq = sum(result == "Y")/length(result)) 来获取浏览器地址,但是如何将其发送给后端bean?每个答案都会有帮助,任何想法?

1 个答案:

答案 0 :(得分:0)

使用

FacesContext.getCurrentInstance().getExternalContext().getRequestHeaderMap().get("referer")
在后台bean中,您可以拥有请求网址。这困扰了我很长一段时间,希望这会帮助别人。