Hallo again,

I'm using the CookieManager in my Programm.
I found a different behaviour between the CookieManager and a Webbrowser 
(Konqueror 3.0, Suse Linux, KDE)

The CookieManager finds just those Cookies where the current URL starts with a 
URL of a saved Cookie:
---schnipp---
if (url.getHost().endsWith(cookie.getDomain()) &&
    url.getFile().startsWith(cookie.getPath()) &&
    (System.currentTimeMillis() / 1000) <= cookie.getExpires()) 
---schnapp---

Provided my first JSP 
"http://localhost:8080/examples/jsp/virformation/redirect_set_cookie.jsp";
sets a Cookie and redirects to a second JSP
"http://localhost:8080/examples/jsp/virformation/redirect_set_cookie_target.jsp";
This JSP checks the cookie that was set by the first JSP (for example for 
security reasons). The CookieManager now compares the paths 
"/examples/jsp/virformation/redirect_set_cookie_target.js".startsWith("/examples/jsp/virformation/redirect_set_cookie.jsp")
and does not set the cookie. The Konqueror Browser does it. To avoid this my 
fist JSP has to set the cookie like this:
---schnipp---
response.setHeader(
        "set-cookie",
        "cookie_name=i_am_a_redirected_cookie; path=/examples/jsp/virformation");
---schnapp---

Is this the behaviour you want?

Ciau.
Tom

--
To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>

Reply via email to