-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1
Greg,
Greg Burrow wrote:
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.
NB that's a redirect, not a forward.
The receiving
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
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
Flavio,
Thanks for the response. Once LaunchServlet in App2 is called it will start
an applet. The RequestDispatcher.forward() will not change the context to
App2 so the applet lookup will occur in App1 and fail. I was able to work
around this by hard coding the codebase attribute in the applet
Konstantin,
My expectation was that the same session would be used by App2 after
the redirect. The javadoc for HttpServletResponse. encodeRedirectURL
looks clear that it should retain the session either by cookies or by
URL rewriting.
HttpServletResponse.encodeRedirectURL
Encodes the specified
Hi Greg,
HttpServletResponse.sendRedirect(String) basically just commands the
web browser proceed to another URL.
It's like opening another browser window, typing the other URL in the
Address bar, then hitting the Enter button.
The session object created in the second web application is a
2009/1/21 Greg Burrow gregbur...@gmail.com:
My expectation was that the same session would be used by App2 after
the redirect. The javadoc for HttpServletResponse. encodeRedirectURL
looks clear that it should retain the session either by cookies or by
URL rewriting.
I do not understand,
Konstantin,
The Servlet specification does make it clear, thanks for the
suggestion. The HttpServletResponse.encodeRedirectURL javadoc on the
other hand seems to contradict the specification.
I now have a workaround for my application by using
RequestDispatcher.forward and setting a new
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