Igor Salma wrote:

Can someone help me with this. The site that I working on is configured to work on Tomcat with the Apache as web server in front of it. I have the problem when in my jsp page try to get server name with:
request.getServerName()

I'm getting "localhost", can anyone tell how can I get the server name that 
user wrote in his browser. I need this cause when someone register for mailing list he 
needs to get mail with confirmation link.

Apache will set the X-Forwarded-Host & X-Forwarded-Port headers if
you're using mod_proxy.

Regards,
--
Bartosz Oudekerk
.---------------------------------.-----------------------------------.
| Hippo B.V.                      | Hippo USA Inc.                    |
| Oosteinde 11                    | 101 H Street, suite Q Petaluma CA |
| 1017 WT  Amsterdam              | 94952-3329  San Francisco         |
| The Netherlands                 | United States                     |
| Tel  +31 (0)20 5224466          | +1 (707) 773-4646                 |
+---------------------------------+-----------------------------------+
|     [EMAIL PROTECTED]     |      http://www.onehippo.com      |
`---------------------------------^-----------------------------------'
********************************************
Hippocms-dev: Hippo CMS development public mailinglist

Reply via email to