tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Bill Barker" <wbar...@wilshire.com>
Subject Re: Where does request.getServerName get name from?
Date Tue, 28 Jan 2003 07:30:27 GMT

"Craig R. McClanahan" <craigmcc@apache.org> wrote in message
news:20030127162116.Q80070-100000@icarus.apache.org...
>
>
> On Mon, 27 Jan 2003, Januski, Ken wrote:
>
> > Date: Mon, 27 Jan 2003 18:03:15 -0500
> > From: "Januski, Ken" <kjanuski@phillynews.com>
> > Reply-To: Tomcat Users List <tomcat-user@jakarta.apache.org>
> > To: Tomcat Users List <tomcat-user@jakarta.apache.org>
> > Subject: Where does request.getServerName get name from?
> >
> > I know this is a simple question but just can't find the answer. I have
two
> > instances of Tomcat running on one server. Each has a login page as the
> > entry point and that page includes a choice of databases. I'd like the
> > default database (i.e. one at top of select list) to be determined by
> > request.getServername(). The problem I'm having is that I'm getting a
name
> > for one IP address and and IP address for the other. I can't figure out
why
> > the second one won't give me a name. I can live with the IP address but
I'd
> > prefer to get a name instead. Can anyone shed any light on where
> > request.getServerName() gets its name from?
> >
>
> It depends very much on the precise configuration and Tomcat version
> you're running.  For standalone Tomcat 4.1.x running the Coyote HTTP/1.1
> connector, it comes from the "host" header included with the request,
> which in turn comes from your browser based on the URL you submitted to.
>

Without looking, it should be the same answer for the Coyote Jk2
Apache/IIS/iPlanet Connector.  If it's not, then the bugs-that-never-die
hall-of-fame has just elected it's new queen ;-).

> > I should add that the server name is in DNS correctly and enable lookups
is
> > set to true.
> >
> > Thanks for any info.
> >
>
> Craig




--
To unsubscribe, e-mail:   <mailto:tomcat-user-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:tomcat-user-help@jakarta.apache.org>


Mime
View raw message