tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jörg Ahrens <joerg.ahr...@braincapital.de>
Subject Re: Is there nobody who could help me with my session problem?
Date Wed, 17 Jan 2001 17:25:55 GMT
Martin Grüneberg wrote:

> But when the session gets lost on changing protokoll and port, how will I
> get the session
> of the user?
> 
> Do I have to implement my own sessionmanagment? (using PathInfo or so???)
> 
> Another stupid question: Is it possible to configure http and https on the
> same port?

You may configure it but it doesn't work :-)

Your configuration looks good, nothing strange or virtual about it. If
you
ask me, a server is defined by the content it provides. So this would be
one
server on two ports (80 and 443).

If you don't want to hack tomcat, the only way to have a user session
lasting longer than one https request using url rewriting is building
your own session management with PathInfo or RequestParameters :-((

If you want to hack tomcat:

- you have to make "https" a valid protocol by adding 
 
-Djava.protocol.handler.pkgs=sun.net.www.protocol\|com.sun.net.ssl.internal.www.protocol
  somewhere in the startscript of tomcat. 
  This should provide a session over severeal requests with https and
urlrewriting.

- you have to change HttpServletResponseFacade.java 
  isEncodeable  has some code like 

	if (request.getServerPort() != urlPort) {
	    	return (false);
	}
	  
  this inhibits url rewriting for urls using a port not equal to
  the port of the current request. Change it to allow protocol change.	

  But keep in mind: this may break the servlet spec.


Jörg
--
----------------------------------------------------------------------
Jörg Ahrens                                            _/ 
brainCAPITAL GmbH                                    _/_/      
Tel.: 0511/8488 5303                               _/  _/           
email: joerg.ahrens@braincapital.de        _/    _/_/_/_/  
.                                        _/_/_/_/      _/
----------------------------------------------------------------------

Mime
View raw message