想从托管在其他域中的iframe访问会话值。
我在grails应用程序中有一个操作,该操作是在我们域的会话中设置值,然后重定向到集成了域URL iframe的另一个域
def action1= {
session.name = "John"
redirect(uri:"https://anotherdomain.com/page1")
}
on https://anotherdomain.com/page1 we have code like below
<iframe src="https://ourdomain.com/action2" style="width: 100%;height: 100%" frameborder="0"></iframe>
def action2={
log.debug "getting value from session ${session.name}"
}
它总是打印为空
我只想在action2中访问该值。请帮助我。
答案 0 :(得分:0)
Sessions变量特定于主机或主机集群(使用会话复制时)。您将无法使用标准会话变量执行此操作。