jon * wrote:

> > My 2c based on my recent experience with the problem of redirect with
> > sesssions.
> >
> > code snippet:
> >
> > session = request.getSession(true);
> > session.putValue("xxx", "yyyyy");
> > request.redirect(anotherURL);
> >
> > IE4 gets to the next page correctly, but Netscape has a problem.  In my case,
> > we have to support at least both IE4 and Netscape.  So I have to stop the
> > redirection feature.
> >
> > It is a browser bug, as far as my experience tells me.  But it will also be
> > very nice to have a work around as proposed by Jason Gilbert.  If possible,
> > PLEASE add the workaround.
>
> Your bug has nothing to do with Jason's bug since your bug is about
> redirection and his bug is about cookies. What URL are you using? Are you
> using a full http:// url or are you using a relative path url? If you are
> using the later, that is wrong and that is why it isn't working.
>
> I hope that helps,
>

The two bugs come from essentially the same problem, that is "cooki management" and
different bahavious of browsers in treating cookies in a redirection case, and we
know that  the session management requires the use of cookies (at lease in my
program).  I promptly did a simple testing using "lynx" to verify my claims.  in my
test case, I request the 1st page served by servlet 1, and servet 1 actually
redirect lynx client to servlet 2.  But, servlet 1 will build a session using the
following code:

session = request.getSession(true);
session.putValue("xxx", "yyyyy");

right after that, response object do a redirect.

What lynx client gets is this: before the redirect happens but after servlet 1
creates a session object, lynx prompts and ask if the cookie (of the form
"JServSessionId=xxxxxxxxxxx.xxxxxxxx") is allowed.

Now answer your question: do I use a fully qualified URL with absolute host,
protocal, port, path.  Yes.

thanks for the response and regards,

-shaoping zhou

>
> -jon
>
> ----------------------------------------------------------------
> To subscribe:        [EMAIL PROTECTED]
> To unsubscribe:      [EMAIL PROTECTED]
> Archives and Other:  <http://www.working-dogs.com/>
> Problems?:           [EMAIL PROTECTED]

--
Metaphase Technology Group | voice: (651) 482-2966
4201 Lexington Ave N, Arden Hills, MN 55126




----------------------------------------------------------------
To subscribe:        [EMAIL PROTECTED]
To unsubscribe:      [EMAIL PROTECTED]
Archives and Other:  <http://www.working-dogs.com/>
Problems?:           [EMAIL PROTECTED]

Reply via email to