Re: encodeRedirectURL URL rewrite not working

2009-01-23 Thread Christopher Schultz
-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

Re: encodeRedirectURL URL rewrite not working

2009-01-21 Thread Flavio Crispim
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

Re: encodeRedirectURL URL rewrite not working

2009-01-21 Thread Konstantin Kolinko
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

Re: encodeRedirectURL URL rewrite not working

2009-01-21 Thread Greg Burrow
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

Re: encodeRedirectURL URL rewrite not working

2009-01-21 Thread Greg Burrow
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

Re: encodeRedirectURL URL rewrite not working

2009-01-21 Thread Karl San Gabriel
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

Re: encodeRedirectURL URL rewrite not working

2009-01-21 Thread Konstantin Kolinko
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,

Re: encodeRedirectURL URL rewrite not working

2009-01-21 Thread Greg Burrow
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

encodeRedirectURL URL rewrite not working

2009-01-20 Thread Greg Burrow
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