René Salle wrote:

> I suspect my previous mail on the subject included somewhat incorrect
> assertions but I delete mails that are not worth keeping... ;-)
>
> Anyway, what's might be worth mentioning is that we use mod_jk, and AFAIK,
> that's the way Tomcat gets the host name it uses for redirections and not
> through conf files. (I'm definitely not an expert on this.)
>

It is correct that the server name that Tomcat sees is up to the connector --
web servers get a virtual host's name from the "Host:" header included with
the request.  In turn this will normally be based on the host name that you
type in the original URL of the request.

For a web-connected Apache, the connector has the opportunity to modify this
header before forwarding it to Tomcat.  I'm not familiar enough with the
MOD_JK connector to know what changes it supports/allows/does, but it's
certainly possible.

You can find out what server name is being passed on to Tomcat by executing
one of the example servlets through the connector, like this:

    http://localhost/examples/jsp/snp/snoop.jsp

(Make sure you are going through the connector, not straight to Tomcat at port
8080).  The Server name that is shown is what Tomcat thinks the virtual host
server name is, and is the name used when converting relative to absolute URLs
(and for creating session cookies).

>
> I agree that Tomcat must send back absolute URL as stated in 14.30 of RFC
> 2616, but maybe is there still an issue pending about which server name it
> should uses to ensure smooth functioning including behind NAT.
>

Craig




---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to