geronimo-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Paul McMahan" <paulmcma...@gmail.com>
Subject Re: Geronimo and Cookies-code snippet
Date Tue, 03 Oct 2006 18:34:41 GMT
When I pasted that code into a JSP (renaming the cookie array to
cookies to avoid a compile error) and ran it in the Tomcat version of
Geronimo 1.1 it worked as expected.

The first request produced:
Here testign this...1
Here testign JSESSIONID

and the subsequent requests produced:
Here testign this...2
Here testign JSESSIONID
Here testign mycookie
cookie present..test

Which version of Geronimo are you using?

Paul


On 10/3/06, sreepriya ramakrishnan <sreepriya_ramakrishnan@yahoo.com> wrote:
>   Cookie cookie = new Cookie("mycookie","test");
>   cookie.setMaxAge(60);
>  response.addCookie(cookie);
>
> then:
>
> Cookie cookie[]=request.getCookies()
> ;System.out.println("Here testign
> this..."+cookie.length);
>                         for (int i=0;i<cookie.length;i++)
>                         {
>                                 System.out.println("Here testign
> "+cookie[i].getName());
>                                 if(cookie[i].getName().equals("mycookie"))
>                                 {
>                                         System.out.println("cookie
> present.."+cookie[i].getValue());
>                                 }
>                         }
>
> -Priya

Mime
View raw message