【发布时间】:2010-12-18 17:00:01
【问题描述】:
我在 apache 网络服务器前端的 tomcat 下运行 java 应用程序。 在我的代码中,我将 cookie 域设置为 .example.com
但我的 cookie 仍然显示在客户端浏览器中的 www.example.com 下,而不是 example.com 下。什么是奇怪的谷歌分析 cookie 显示在 example.com 下,但我自己的代码无法在 example.com 下存储 cookie?
Apache 服务器的设置使得对 example.com 的请求在客户端浏览器地址栏中显示为 www.example.com,如果这与问题有关?我确实需要这个,否则会为 example.com 和 www.example.com 生成不同的会话 ID,这对我的应用程序不利。
【问题讨论】:
标签: java apache tomcat cookies