D
Dobedani
Dear All,
I have written a Java Server Page and I have added this as my first
line of Java code:
Cookie cookies[] = request.getCookies();
When I loop through the cookies like this
out.println("<table>");
for (int i=0; i<cookies.length; i++) {
out.println("<tr>");
out.println("<td>" + cookies.getName() + "</td>");
out.println("<td>" + cookies.getDomain() + "</td>");
out.println("<td>" + cookies.getPath() + "</td>");
out.println("<td>" + cookies.getValue() + "</td>");
out.println("<td>" + cookies.getMaxAge() + "</td>");
out.println("</tr>");
}
out.println("</table>");
I get all the cookies BUT ONE!
I make sure I use the same browser window throughout. I am running all
kinds of applications on my machine, e.g. some based on ASP Classic
etc. I am also runnig a CGI application developed in Delphi with an
add-on called CGI Expert. In that application a cookie is set with name
$$Default. With ASP, Perl etc. my scripts show all the (session)
cookies like JSESSIONID, ASPSESSIONXXX, incl. the one called $$Default.
However, when I run my Java Server Page, I see all those other cookies
but the $$Default cookie is not shown!!!
Unfortunately, I am interested to get hold of that very cookie! Is
there maybe a way to get hold of something that is send along in the
headers called HTTP_COOKIE? I have already tried to use a servlet and
to get this thing by invoking:
servlet.getInitParameter("HTTP_COOKIE")
to no avail. Please help! TIA
Kind regards,
Dobedani
Wageningen
The Netherlands
I have written a Java Server Page and I have added this as my first
line of Java code:
Cookie cookies[] = request.getCookies();
When I loop through the cookies like this
out.println("<table>");
for (int i=0; i<cookies.length; i++) {
out.println("<tr>");
out.println("<td>" + cookies.getName() + "</td>");
out.println("<td>" + cookies.getDomain() + "</td>");
out.println("<td>" + cookies.getPath() + "</td>");
out.println("<td>" + cookies.getValue() + "</td>");
out.println("<td>" + cookies.getMaxAge() + "</td>");
out.println("</tr>");
}
out.println("</table>");
I get all the cookies BUT ONE!
I make sure I use the same browser window throughout. I am running all
kinds of applications on my machine, e.g. some based on ASP Classic
etc. I am also runnig a CGI application developed in Delphi with an
add-on called CGI Expert. In that application a cookie is set with name
$$Default. With ASP, Perl etc. my scripts show all the (session)
cookies like JSESSIONID, ASPSESSIONXXX, incl. the one called $$Default.
However, when I run my Java Server Page, I see all those other cookies
but the $$Default cookie is not shown!!!
Unfortunately, I am interested to get hold of that very cookie! Is
there maybe a way to get hold of something that is send along in the
headers called HTTP_COOKIE? I have already tried to use a servlet and
to get this thing by invoking:
servlet.getInitParameter("HTTP_COOKIE")
to no avail. Please help! TIA
Kind regards,
Dobedani
Wageningen
The Netherlands