-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Tony,

[EMAIL PROTECTED] 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: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to