cnshell
小狐狸
小狐狸
  • UID11739
  • 注册日期2006-03-02
  • 最后登录2006-03-02
  • 发帖数1
  • 经验10枚
  • 威望0点
  • 贡献值0点
  • 好评度0点
阅读:1417回复:0

为什么jsp 中无法取得父域的cookie

楼主#
更多 发布于:2006-03-02 14:32
父域:news.home.com , 设置cookie 的方法是:

Cookie cookie = new Cookie(name, value);
cookie.setSecure(false);
cookie.setMaxAge(maxage);
cookie.setPath("/");

response.addCookie(cookie);


子域: search.news.home.com

在firefox浏览网页时,使用插件中的“显示cookies”已经看到父域的cookie 了。
可是JSP中执行一下代码,
Cookie []cookies = request.getCookies();

在IE下都可以取道cookie ,而firefox 下却无法取道,是为什么?!
游客

返回顶部