T
Tim O'Connor
....and not having a lot of success. I'm using this code that I got
from a website:
<%
Cookie[] cookies = request.getCookies();
for(int loopIndex = 0; loopIndex < cookies.length; loopIndex++)
{
Cookie cookie1 = cookies[loopIndex];
out.println("name = " + cookie1.getName() + "<BR>");
out.println("value = " + cookie1.getValue() + "<BR>");
out.println("domain = " + cookie1.getDomain() + "<BR>");
}
%>
When I run it, it retrieves a single cookie whose name is SITESERVER,
value is ID=averylonghexnumber and Domain is null. This does not
resemble any of the cookies in my C:\Documents and
Settings\OConnorT\Cookies directory (of which there are many). I've
also tried setting a cookie using:
<%
Cookie cookie = new Cookie("MyCookie", "CookieValue");
response.addCookie(cookie);
%>
but when I read it back it can't be found. What am I doing wrong?
Does it have to do with the cookie Domain? What is the "domain" of a
cookie? I'm using Windows XP Professional and IE 6.xx.
Tim
from a website:
<%
Cookie[] cookies = request.getCookies();
for(int loopIndex = 0; loopIndex < cookies.length; loopIndex++)
{
Cookie cookie1 = cookies[loopIndex];
out.println("name = " + cookie1.getName() + "<BR>");
out.println("value = " + cookie1.getValue() + "<BR>");
out.println("domain = " + cookie1.getDomain() + "<BR>");
}
%>
When I run it, it retrieves a single cookie whose name is SITESERVER,
value is ID=averylonghexnumber and Domain is null. This does not
resemble any of the cookies in my C:\Documents and
Settings\OConnorT\Cookies directory (of which there are many). I've
also tried setting a cookie using:
<%
Cookie cookie = new Cookie("MyCookie", "CookieValue");
response.addCookie(cookie);
%>
but when I read it back it can't be found. What am I doing wrong?
Does it have to do with the cookie Domain? What is the "domain" of a
cookie? I'm using Windows XP Professional and IE 6.xx.
Tim