Get ColdFusion server host information

December 11, 2010 by Jean

Here is how to get the ColdFusion server host name and IP address:

iaclass = CreateObject("java", "java.net.InetAddress");addr=iaclass.getLocalHost();
hostName = iaclass.localHost.getHostName();
hostName2 = addr.getHostName();
hostIp = addr.getHostAddress();

In: ColdFusion