我们创建了一个与ariba集成的打孔(cXML Punchout)供应商网站。它在使用带有框架环境的谷歌浏览器中尝试时工作正常,但在IE中为同一帧环境继续丢失其会话。当我们将JsessionID传递给仅用于起始页面的网址时。如果我们使用其他链接导航,则会开始丢失会话。即使正在为这些导航链接传递JsessionId,我们也登录了页面。
这个站点是用JAVA Struts2 Frame构建的。我们正在使用Jboss V 5.1服务器和Apache。
如何在整个演出过程中保留会话?
答案 0 :(得分:0)
通过在Apache中使用P3P策略解决突破中的会话问题,在IE中第三方cookie被阻止,以使浏览器需要在网络服务器中进行解锁并在页眉中进行配置。
apache配置文件中的setHeader。 ===>
Header set P3P "policyref=\"example.com/w3c/p3p.xml\", CP=\"IDC DSP COR ADM DEVi TAIi PSA PSD IVAi IVDi CONi HIS OUR IND CNT\""
您也可以在项目的母版页中放置setHeader或addheader代码(可选)
在此之前创建一个P3P.xml文件(使用下面的示例或你可以使用生成器工具)并部署它。
示例P3P.xml:
<?xml version="1.0" encoding="UTF-8" ?>
<!-- Generated by http://www.webentrust.com on 05/25/2011 -->
<META xmlns="http://www.w3.org/2002/01/P3Pv1">
<POLICY-REFERENCES>
<POLICY-REF about="#Policy">
<INCLUDE>/*</INCLUDE>
</POLICY-REF>
</POLICY-REFERENCES>
<POLICIES xmlns="http://www.w3.org/2002/01/P3Pv1">
<EXPIRY max-age="604800"/>
<POLICY name="Policy" discuri="http://www.example.com/privacy.html" opturi="http://www.example.com/contact.html">
<ENTITY>
<DATA-GROUP>
<DATA ref="#business.name">example.com</DATA>
<DATA ref="#business.contact-info.online.email">privacy@example.com</DATA>
</DATA-GROUP>
</ENTITY>
<ACCESS>
<all/>
</ACCESS>
<DISPUTES-GROUP>
<DISPUTES resolution-type="service" short-description="Privacy Disputes" service="http://example.com/contact.html">
<REMEDIES>
<CORRECT/>
</REMEDIES>
<LONG-DESCRIPTION>We will correct any privacy issues.</LONG-DESCRIPTION>
</DISPUTES>
<DISPUTES resolution-type="independent" short-description="Web Entrust" service="http://www.webentrust.com/sites/example.com.html">
<REMEDIES>
<CORRECT/>
</REMEDIES>
<LONG-DESCRIPTION>Web Entrust provides several active seals to represent increased trust, privacy and security. Public reviews provide accountability through an open review policy.</LONG-DESCRIPTION>
<IMG alt="Web Entrust Site Seals" src="http://www.webentrust.com/seals/trusted/example.com.png"/>
</DISPUTES>
</DISPUTES-GROUP>
<STATEMENT>
<CONSEQUENCE>Web server logs are maintained for this web-site.</CONSEQUENCE>
<EXTENSION optional="yes">
<STATEMENT-GROUP name="Logging" xmlns="http://www.w3.org/2006/01/P3Pv11"/>
</EXTENSION>
<PURPOSE>
<current/>
<admin/>
<develop/>
<pseudo-analysis/>
<pseudo-decision/>
<tailoring/>
</PURPOSE>
<RECIPIENT>
<ours/>
</RECIPIENT>
<RETENTION>
<business-practices/>
</RETENTION>
<DATA-GROUP>
<DATA ref="#dynamic.clickstream"></DATA>
<DATA ref="#dynamic.clientevents"></DATA>
<DATA ref="#dynamic.http"></DATA>
<DATA ref="#dynamic.searchtext"></DATA>
</DATA-GROUP>
</STATEMENT>
</POLICY>
</POLICIES>
</META>
了解更多详情: