It's been a while since I've written here, but I have what should be a
simple question.

I'm trying to set up a generic way to determine the right cookie domain to
set for our servers. In our case, we'd like all servers in the same domain
to share cookies, so for example, for:

www.bar.com
and
foo.bar.com

will both set their cookie domains to:

.bar.com

The problem is that we have some servers that when testing systems, we talk
to servers on specific ports:

baz.bar.com:4555

and it appears that this system doesn't work. So in our domain-finding
method on non-jserv systems, we simply look at the request and find the
colon. If it exists, then set the domain to the full server request
(baz.bar.com:4555) which will fail on the other servers, but at least we
don't need to have different code running for testing and production.

Here's the hard part.  In Jserv, I can't seem to find how to access the
request string from the user. I can get the server name and port, but that's
not good enough. Here's why. My server, running on port 4555, is behind a
load-balancer which allows the user to think he/she is hitting port 80 of a
virtual host. The request would be for http://www.bar.com/, which to the
client looks like port 80 of www.bar.com, but in reality, the server is
baz.bar.com, port 4555. When Jserv gives me the port, it says 4555, and I
can't set the right cookie domain.


Hope this isn't too confusing, but the simplest question is: Is there any
way to find the request string sent by the user from a servlet? The rest I
could figure out.


Thanks much.


Bernie Bernstein
[EMAIL PROTECTED]



-- --------------------------------------------------------------
To subscribe:        [EMAIL PROTECTED]
To unsubscribe:      [EMAIL PROTECTED]
READ THE FAQ!!!!     <http://java.apache.org/faq/>
Archives and Other:  <http://java.apache.org/main/mail.html/>
Problems?:           [EMAIL PROTECTED]

Reply via email to