RE: getServerName returns 'localhost'

2010-03-03 Thread vgud
I tried to log all request headers and notice three interesting headers: x-forwarded-for : 10.0.0.24 x-forwarded-host : myRealDomain.com x-forwarded-server : my.server.ip.address So, tomcat(or someone else) does some forwarding and attach those headers on request? If so where and how it is conf

Re: getServerName returns 'localhost'

2010-03-03 Thread vgud
st" in stead of "www.example.com"? > > Ronald. > > Op woensdag, 3 maart 2010 14:19 schreef vgud : >> >> >> >> Users use tomcat directly. >> >> My server responds to different domain names, and I want to know which >> one >&g

Re: getServerName returns 'localhost'

2010-03-03 Thread vgud
Users use tomcat directly. My server responds to different domain names, and I want to know which one users use. I try to get domain name by request.getServerName() but instead of domainName.com I get 'localhost'. awarnier wrote: > > vgud wrote: >> Gentlemen, >>

getServerName returns 'localhost'

2010-03-03 Thread vgud
Gentlemen, I have the application which could be accessed from different domain addresses and I need to know from what domain request was sent. I try to get following from request: getRemoteHost: 127.0.0.1 getServerName: localhost I use tomcat 5.5 and I suppose i should configure something to g