Re: getting hostname from NT machine via Citrix
From: Tilman Bohn (myfirstname_at_gmx.net)
Date: Wed, 23 Feb 2005 20:07:08 GMT
In message <iY4Td.email@example.com>,
PerfectDayToChaseTornados wrote on Wed, 23 Feb 2005 19:37:50 GMT:
>| > LDAP lookup. What we are stuck on is the following. We would like to be
>| > to get the hostname of the NT machine which is logging on. Someone has
>| Please define `hostname'.
> The machine name on the NT network. Failing that the I.P. address of the
> machine will do. We just need to be able to identify which machine the login
> came from.
That's why I asked. Hostname is an overloaded term, especially in a
heterogeneous environment. You mentioned tomcat so you are alreay doing
servlets. The client IP address should be available through
[Http]ServletRequest[Wrapper]'s getRemoteAddress() method. Similarly,
you get the _DNS_ hostname through getRemoteHost(). This may or may not
coincide with its NetBIOS name (which I wouldn't know how to retrieve).
-- Cheers, Tilman `Boy, life takes a long time to live...' -- Steven Wright