Hi Mallinath,
You must be doing something wrong... :-)
Try simplifying the problem until it works and then find out the error in
your code.
Have you tried writing and testing the following:
public void beginCookieEncoding(WebRequest theRequest)
{
theRequest.addCookie("testcookie", "whatever");
}
public void testCookieEncoding()
{
javax.servlet.http.Cookie[] cookies = request.getCookies();
assertNotNull("No cookies in request", cookies);
for (int i = 0; i < cookies.length; i++)
{
if (cookies[i].getName().equals("testcookie"))
{
assertEquals("whatever", cookies[i].getValue());
return;
}
}
fail("No cookie named 'testcookie' found");
}
-Vincent
> -----Original Message-----
> From: Mallinath Suralikal (C) [mailto:[EMAIL PROTECTED]
> Sent: jeudi 10 juin 2004 21:50
> To: Cactus Users List
> Subject: adding Cookie - request object doesn't get updated.
>
> Hi,
>
> I am adding the Cookies using WebRequest.addCookie(String, String). At
> the
> server side, if I do getCookies(), it's returning null. Looks like the
> cookies are not updated on the request.
>
> Thanks
> Malli
>
> ---
> Incoming mail is certified Virus Free.
> Checked by AVG anti-virus system (http://www.grisoft.com).
> Version: 6.0.711 / Virus Database: 467 - Release Date: 25/06/2004
>
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]