Return-Path: Delivered-To: apmail-tomcat-users-archive@www.apache.org Received: (qmail 48494 invoked from network); 6 Aug 2007 17:56:04 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 6 Aug 2007 17:56:04 -0000 Received: (qmail 13494 invoked by uid 500); 6 Aug 2007 17:55:51 -0000 Delivered-To: apmail-tomcat-users-archive@tomcat.apache.org Received: (qmail 13471 invoked by uid 500); 6 Aug 2007 17:55:51 -0000 Mailing-List: contact users-help@tomcat.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: "Tomcat Users List" Delivered-To: mailing list users@tomcat.apache.org Received: (qmail 13460 invoked by uid 99); 6 Aug 2007 17:55:51 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 06 Aug 2007 10:55:51 -0700 X-ASF-Spam-Status: No, hits=1.2 required=10.0 tests=SPF_NEUTRAL X-Spam-Check-By: apache.org Received-SPF: neutral (nike.apache.org: local policy) Received: from [63.240.77.81] (HELO sccrmhc11.comcast.net) (63.240.77.81) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 06 Aug 2007 17:55:36 +0000 Received: from [192.168.1.101] (c-68-50-0-179.hsd1.va.comcast.net[68.50.0.179]) by comcast.net (sccrmhc11) with ESMTP id <2007080617552301100li3fee>; Mon, 6 Aug 2007 17:55:23 +0000 Message-ID: <46B76087.30904@christopherschultz.net> Date: Mon, 06 Aug 2007 13:55:19 -0400 From: Christopher Schultz User-Agent: Thunderbird 2.0.0.6 (Windows/20070728) MIME-Version: 1.0 To: Tomcat Users List Subject: Re: cookies References: In-Reply-To: X-Enigmail-Version: 0.95.2 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Virus-Checked: Checked by ClamAV on apache.org -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Tony, tony.chamberlain@lemko.com wrote: > He has something called login.html which uses a login.java compiled > program to set a cookie (response.addCookie( "UserLevel", "value") ) > which adds a cookie called UserLevel with a value retrieved from > logging in. His other java code does a request.getCookies() and goes > through the cookies to find "UserLevel" from which he then gets the > values. That sounds pretty standard. You ought to be able to replicate this capability pretty easily. > My code does the same thing, does > getCookies[] and looks for "UserLevel". Problem is, it does not find > it. When I do the Edit->Preferences->"Show Cookies", UserLevel is > there with the correct value, but all my java jsp code can find is > the session ID. Can you post your "cookie finding" code? Also, post the portion of your (new) code that /sets/ the cookie. Often, cookie-related issues are tied to incorrect setting of the "path" of the cookie. Also, are you using SSL at all? If so, please describe any changes from/to SSL requests during this process. > Does anyone know what I am doing wrong, or how I can get the > recently-added cookie? > > I am using firefox. Oh, good. There are several tools available for ff that are useful in this regard. LiveHTTPHeaders is an add-on that allows you to snoop the request and response headers of HTTP transactions. Once installed, you can just open a LiveHTTPHeaders window and then go through your login process. You can see the headers for all page requests until you clear the buffer, so you can verify that, at least, the cookies are being sent correctly. - -chris -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.7 (MingW32) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org iD8DBQFGt2CH9CaO5/Lv0PARAo7YAJ92cq9fGzFhA4OBH1yJt19PKMHwGQCfecGy 85fW97ugj27ORccs95Rv5pM= =t321 -----END PGP SIGNATURE----- --------------------------------------------------------------------- To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org For additional commands, e-mail: users-help@tomcat.apache.org