tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Craig R. McClanahan" <>
Subject Re: Absolute URLs on redirections
Date Mon, 06 Nov 2000 00:41:52 GMT
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:


(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.


View raw message