Hi Greg

You may try this on App1:

RequestDispatcher rd;
rd = context.getContext("/App2").getRequestDispatcher("/LaunchServlet");
rd.forward(request, response);

Flavio

"Greg Burrow" <gregbur...@gmail.com> gravou em 20/01/2009 18:44:18:

> 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?
>
>
> Thanks,
>
> Greg


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org

Reply via email to