Hi Richard;

The client only sends you cookies you've set yourself (cookies
associated with your domain).  JSESSIONID is set by Tomcat, it appears
to be the only cookie the client has from your domain.  Try setting a
cookie in the response, and see whether it appears in the next request.

David

> -----Original Message-----
> From: A mailing list about Java Server Pages specification
> and reference [mailto:[EMAIL PROTECTED]] On Behalf Of
> Richard Lui
> Sent: Wednesday, January 23, 2002 2:52 PM
> To: [EMAIL PROTECTED]
> Subject: getCookie()
>
>
> HI,
>
> I'm using Apache-Tomcat and I'm having problem getting the
> cookie from the client. In a html form, click 'Go' trigger
> the following: <form action="/sample/WizardStart.jsp"
> method=GET> <table>
>    <tr><td>
>    <input type=submit value="Go">
>    <input type=hidden name="company" value="ABC Company">
>    </td></tr>
> </table>
> </form>
>
> Inside WizardStart.jsp, I put in some code to check what's
> stored in client cookie:
>
> <%
>      Cookie  ckobj_a[] = request.getCookies();
>       int    num_ckobj = 0;
>       String reqValue = null;
>
>       if (ckobj_a != null)
>       {
>          num_ckobj = ckobj_a.length;
>       }
>       for (int i = 0; i < num_ckobj; ++i)
>       {
>          Cookie   ckobj = ckobj_a[i];
> System.out.println ("Checking cookie: " + ckobj.getName());
>       }
> %>
>
> I got "Checking cookie: JSESSIONID" in the tomcat console.
> I expect to see the
> client's cookies, what's going on here?   Thanks.
>
>
> --Richard
>
> ==============================================================
> =============
> To unsubscribe: mailto [EMAIL PROTECTED] with body:
> "signoff JSP-INTEREST". For digest: mailto
> [EMAIL PROTECTED] with body: "set JSP-INTEREST DIGEST".
> Some relevant FAQs on JSP/Servlets can be found at:
>
 http://archives.java.sun.com/jsp-interest.html
 http://java.sun.com/products/jsp/faq.html
 http://www.esperanto.org.nz/jsp/jspfaq.jsp
 http://www.jguru.com/faq/index.jsp
 http://www.jspinsider.com

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

 http://archives.java.sun.com/jsp-interest.html
 http://java.sun.com/products/jsp/faq.html
 http://www.esperanto.org.nz/jsp/jspfaq.jsp
 http://www.jguru.com/faq/index.jsp
 http://www.jspinsider.com

Reply via email to