> I'm not really understand of how this cookie works.
> I have this example and run it in a browser,
> <html>
>          <head>
>          </head>
>          <body>
>            <%
>
>            adds a cookie
>            Cookie c = new Cookie("foo","foobar");
>            response.addCookie(c);
>
>            gets the cookies
>            Cookie[] cookies = request.getCookies();
>            out.print("# of cookies found = " + cookies.length + "<P>");
>
>            if (cookies != null)
>            {
>              for (int i = 0; i<cookies.length; i++)
>              {
>
>                  out.print("name: " + cookies[i].getName()+"<P>");
>                  out.print("value: " + cookies[i].getValue()+"<P>");
>              }
>            }
>            %>
>          </body>
>      </html>
>
> In the end I got result,
> # of cookies found = 0
> Shouldn't it suppose to have 1 cookie, that is "foo" and the value is
"foobar"?
>
> Please need your assistance.
>
> Thanks a lot,
> Muliawan

===========================================================================
To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST".
Some relevant FAQs on JSP/Servlets can be found at:

 http://java.sun.com/products/jsp/faq.html
 http://www.esperanto.org.nz/jsp/jspfaq.html
 http://www.jguru.com/jguru/faq/faqpage.jsp?name=JSP
 http://www.jguru.com/jguru/faq/faqpage.jsp?name=Servlets

Reply via email to