dev@glassfish.java.net

Obtaining the hostname from Listeners

From: Nithya Subramanian <Nithya.Subramanian_at_Sun.COM>
Date: Mon, 21 Mar 2011 17:33:15 +0530

Hi,

In the context of fixing GlassFish Issue 16209, we are looking for a way
to obtain the hostname of the GF instance from the listener in which the
request was received (in order to compare it with the Host header of the
request).

We tried to get the Network listeners , loop through them and get the
serverName /address of the individual ones, however the serverName is
set to null and the address is set to 0.0.0.0 by default.

Is there a way in which we could obtain the hostname of the GFinstance
through the listeners ?

Thanks
Nithya