You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by "Varghese, Rennu" <Re...@ubswenergy.com> on 2002/03/22 00:56:13 UTC

response.encodeURL and jsessionid

Hello all,
	I have a serious problem with url rewriting in tomcat.

here are the snippets of code. I'm using tomcat 3.3a

 I have cookies turned off, in server.xml <SessionId cookiesFirst="false" noCookies="false" />, I also tried with noCookies = false.  i've taken out exception handling and irrelevant code.
 
	String orgpath = response.encodeURL( url );
  	forwardRequest( url, request, response );
      context_.getRequestDispatcher( url ).forward( request, response );
  
I have a simple test jsp with code like this.
  
            String sessionIdStr = ";jsessionid=" + request.getSession().getId() ;
            String topFrameUrl = response.encodeURL("/home" +  "?ID=InitialTask");
        <%
            out.println("Session id string is: " + sessionIdStr );
      	out.println("<br>");
      	out.println("Top frame new url is: " + topFrameUrl); 
	%> 

the session id prints correctly. but the topFrameUrl prints without the ;jsessionid part.  
It's killing me. It looks like the response.encodeURL on jsp is not working.  I've tried both encodeUrl(deprecated) and encodeURL

I've seen numerous postings in the archives regarding this issue, but no conclusive solution or answer that works. Somebody has to have a solution to this, other than hacking the urls in the jsp to include ;jsessionid before the ?


thanks,
	Rennu.
 


Visit our website at http://www.ubswarburg.com

This message contains confidential information and is intended only for the individual named.  If you are not the named addressee you should not disseminate, distribute or copy this e-mail.  Please notify the sender immediately by e-mail if you have received this e-mail by mistake and delete this e-mail from your system.

E-mail transmission cannot be guaranteed to be secure or error-free as information could be intercepted, corrupted, lost, destroyed, arrive late or incomplete, or contain viruses.  The sender therefore does not accept liability for any errors or omissions in the contents of this message which arise as a result of e-mail transmission.  If verification is required please request a hard-copy version.  This message is provided for informational purposes and should not be construed as a solicitation or offer to buy or sell any securities or related financial instruments.


--
To unsubscribe:   <ma...@jakarta.apache.org>
For additional commands: <ma...@jakarta.apache.org>
Troubles with the list: <ma...@jakarta.apache.org>