2009/1/20 Greg Burrow <gregbur...@gmail.com>: > Hello, > I have two web applications in different context, one servlet will forward > the request to a servlet in the other application using encodeRedirectURL > and sendRedirect. The receiving servlet creates a new session and session > attributes are lost. > Running Tomcat 5.5.17. > > Here is the flow: > > GET /App1/RedirectServlet HTTP/1.1 > Cookie: JSESSIONID=7AFACD0318419C34938B6410BB9A1937 > > RedirectServlet > response.sendRedirect(response.encodeRedirectURL("/App2/LaunchServlet")); > > HTTP/1.x 302 Moved Temporarily > > GET /App2/LaunchServlet HTTP/1.1 > (no cookie) > > HTTP/1.x 200 OK > Set-Cookie: JSESSIONID=BE408BFD3480E29DF2A4278BCA3C1FC6; Path=/App2 > > > The same behavior occurs in Firefox and IE. Cookies are enabled in both > browsers and crossContext="true" in context.xml. Is this a bug in Tomcat or > a problem with my method of redirect? >
I do not understand, what are you expecting? Note, that according to the spec you cannot share a session between different web applications. That is, session ID can be the same, but the session object is different. Best regards, Konstantin Kolinko --------------------------------------------------------------------- To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org