It would appear that, under Apache, if you change the hostname by which you
access a web server, even if that hostname resolves to the same actual host,
Tomcat can't pick up the cookie.
ie: As I'm on the same subnet, I start with http://myhost/ but as I progress
through the site a redirect or something including just me typing a URL
directly, causing a switch to using the FQDN eg:
http://myhost.mydomain.etc/, the switch causes Tomcat to mislay the cookie
or session object.
But this *doesn't* happen when Tomcat is used in standalone mode - ie: if I
access the same site on port 8080 rather than port 80, and again switch from
http://myhost/ to http://myhost.mydomain.etc/ - the cookie/session object
remains accessible regardless of changes in the hostname the client makes.
The problem only occurs when the site is used through Apache, so presumably
it's a problem in Apache and/or the JServ connector. I tried uncommenting
the ServerName directive in httpd.conf so it explicitly specifies the host's
FQDN but it made no difference. Any ideas anyone?
I'm not even sure I should be considering it a bug, as this might be a
necessary thing to allow virtual hosting to work in Apache.
FWIW: Apache 1.3.12, Tomcat 3.1 (including mod_jserv.so built from Tomcat
3.1 sources), running on Linux and Sun JDK1.3 beta.