Hello Everyone,
Similar to a previous posting, I have some code to make a cookie:
Cookie cook = new Cookie("memberCookie", userid);
cook.setPath("/mydir");
response.addCookie(cook);
and to retreive the cookie:
Cookie cookies[] = request.getCookies();
for(int i = 0; i < cookies.length; i++) {
if (cookies[i].getName().equals("memberCookie")); {
out.println("Welcome: " + cookies[i].getValue() + "<p>");
}
}
to retrieve the cookie. It retrieves the value but with an additional
nuisance. I get the desired cookie, but also what appears to be the session
ID (output below).
Welcome: paul
Welcome: 61D0D4C3E11302B07308C3D960D13840
I am obviously looping through the length of the cookies array, retrieving
the value, but also this unwanted text. What can I do to retrieve just the
value please? It looks like my if condition is being satisified twice?!
Frustrated
Paul.
--
To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>