Cookies 将JBoss中的Cookie域配置为5.1

Cookies 将JBoss中的Cookie域配置为5.1,cookies,jboss,jboss5.x,Cookies,Jboss,Jboss5.x,我想在jboss配置中配置域名。例如,当前“exampledomain”作为Cookie中的域值。但是我想喜欢这个“www.exampledomain.com”或“someothername.com” 我试过了 <SessionCookie secure="true" httpOnly="true" domain ="www.exampledomain.com"/> 在context.xml中 context.xml可以在jboss/server//deploy/jbossw

我想在jboss配置中配置域名。例如,当前“exampledomain”作为Cookie中的域值。但是我想喜欢这个“www.exampledomain.com”或“someothername.com”

我试过了

<SessionCookie secure="true" httpOnly="true" domain ="www.exampledomain.com"/> 

context.xml

context.xml可以在jboss/server//deploy/jbossweb.sar/context.xml中找到。这也不管用

请让我知道如何在jboss配置中配置此域值


JBoss AS版本:JBoss-5.1.0.GA

事实上,JBoss无法解决您的跨域需求。因为web浏览器造成了跨域问题

当您第一次访问“exampledomain”时,服务器将为您设置“证明(Jsession)”。然后,当你在第二节访问“exampledomain”时。网络浏览器将找到校样并将其发送到同一网站

但是,当您访问“其他名称”时,您的web浏览器不会认为您访问的是同一个网站。所以它不会将“证据”发送到服务器。最后,服务器无法获得“证明”和跨域数据

如果你想解决这个问题,你需要找到其他的方法,比如“jsonp”。你可以搜索它,找到更好的答案