<%@ page contentType="text/html; charset=utf-8"%>
<%
  Cookie _cookie=new Cookie("haha", "53329");
  _cookie.setMaxAge(30*60); 
  _cookie.setDomain(".localhost");
  response.addCookie(_cookie); // 写入客户端硬盘
  out.print("写 一  Cookie完成");
%>
<%
  Cookie cookie=new Cookie("nono", "1134568");
  cookie.setMaxAge(30*60); 
  cookie.setDomain(".localhost");
  response.addCookie(cookie); 
  out.print("写 二  Cookie完成");
%>
<html>
<head>
<title>Reading Response Headers</title>
<script type="text/javascript" language="javascript">
var http_request = false;
window.onload = function makeRequest(url) {
var url = "hopefinal.jsp";
if (window.XMLHttpRequest) { // Mozilla, Safari,...
http_request = new XMLHttpRequest();
if (http_request.overrideMimeType) {
http_request.overrideMimeType('text/xml');
}
} else if (window.ActiveXObject) { // IE
try {
http_request = new ActiveXObject("Msxml2.XMLHTTP");
} catch (e) {
try {
http_request = new ActiveXObject("Microsoft.XMLHTTP");
} catch (e) {
}
}
}
if (!http_request) {
alert('Giving up :( Cannot create an XMLHTTP instance');
return false;
}
http_request.onreadystatechange = alertContents;
http_request.open('HEAD', url, true);
http_request.send(null);
}
function alertContents() { if (http_request.readyState == 4) {
if (http_request.status == 200) {

                                     alert(http_request.getAllResponseHeaders());   //没能输出想要的结果
alert("Cookie信息:"+http_request.getResponseHeader("Set-Cookie"));     

                            } else {
alert('There was a problem with the request.');
}
} }
</script>
</head>
<body>
</body>
</html>
返回信息中无“Set-Cookie”,这是为什么啊,哪里错了?请指出
firebug可以清楚的看到response header中有“Set-Cookie”信息
小弟拜谢了