tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Paulo Alvim" <>
Subject RES: [java] RE: http->https url rewrite bug TC 5.0.28?
Date Mon, 15 Nov 2004 20:13:21 GMT
Hi Yoav,

I have a similar problem: I'd like to use https only with the login.jsp page
and come back to http after that. Could you explain why it isn't possible?

-----Mensagem original-----
De: Shapira, Yoav []
Enviada em: segunda-feira, 15 de novembro de 2004 12:24
Para: Tomcat Users List
Assunto: [java] RE: http->https url rewrite bug TC 5.0.28?

Not a bug.  You can't share a session that way, whether using cookies or

Yoav Shapira

>-----Original Message-----
>From: John Sidney-Woollett []
>Sent: Monday, November 15, 2004 10:21 AM
>Subject: http->https url rewrite bug TC 5.0.28?
>I'm not sure if this is a bug or a misunderstaning on my part - and
>been searching the archives and googling for most of the day without
>I've got a problem where URL rewriting is failing to correctly encode
>the URL when switching from an insecure (non-ssl) connection to a
>ssl connection FOR THE SAME DOMAIN and where the session already exists
>for the insecure connection and COOKIES ARE DISABLED in the browser. I
>can reproduce this behaviour with different browsers.
>An "action" servlet receives the non-ssl request and redirects to
>another secure "action" servlet. The call for the redirect should
>the URL as follows in the first servlet's service(request, response)
>if (gotoCheckout)
>	//goto the checkout
>	//this generates the URL
>	//
>	String url = CheckoutAction.getCheckoutActionStartURL(request);
>	//make sure the JSESSIONID is appended for non-cookie browsers
>	url = response.encodeRedirectURL(url);
>	response.sendRedirect(url);
>	return;
>Looking at the headers, you can see that the JSESSIONID is not appended
>to the redirect URL when the protocol switches from http to https:
>User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.5a)
>Gecko/20030728 Mozilla Firebird/0.6.1
>Accept-Language: en-us,en;q=0.5
>Accept-Encoding: gzip,deflate
>Accept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.7
>Keep-Alive: 300
>Proxy-Connection: keep-alive
>Content-Type: application/x-www-form-urlencoded
>Content-Length: 66
>HTTP/1.x 302 Moved Temporarily
>Date: Mon, 15 Nov 2004 13:38:23 GMT
>Server: Apache/1.3.29
>Content-Length: 0
>Content-Type: text/plain
>Connection: close
>Apache 1.3.29 + mod_ssl + mod_jk + tomcat 5.0.28 (unix)
>Apache is configured with two virtual directives; one for port 80 and
>one for post 443 and the requests are forwarded by mod_jk to tomcat
>which has the following in its server.xml config:
><Host name="" appBase="/ef02/tc/">
>  <Context path="" docBase="ROOT" debug="0" reloadable="false">
>   <ResourceLink name="jdbc/D1DB" global="jdbc/D1DB"
>  </Context>
>Tomcat possibly nevers "sees" that the request is secure because the
>part of the transaction is handled by mod_SSL, and I don't know if this
>has a bearing on the issue?
>My question, should the JSESSIONID be appended in the encoded redirect
>I think so?
>And if it should, am I doing something wrong. Or is there a bug?
>If there is a bug, should I manually append the ";jsessionid=xxxxxxx"
>the URL to workaround the problem.
>Can anyone shed any light on this?
>Many thanks
>John Sidney-Woollett
>To unsubscribe, e-mail:
>For additional commands, e-mail:

This e-mail, including any attachments, is a confidential business
communication, and may contain information that is confidential, proprietary
and/or privileged.  This e-mail is intended only for the individual(s) to
whom it is addressed, and may not be saved, copied, printed, disclosed or
used by anyone else.  If you are not the(an) intended recipient, please
immediately delete this e-mail from your computer system and notify the
sender.  Thank you.

To unsubscribe, e-mail:
For additional commands, e-mail:

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message