Ed said:
That only gives me the name of the web server. I need the domain...
Then you'll need to clarify what you mean by "domain name". The name
returned by getServerName() is the name which was looked up via DNS
(which is the "domain name service") by the client.
If you want only the domain part of it, the following code will work:
int index = serverName.indexOf('.');
if (index == -1) domainName = null;
else domainName = serverName.substring(index + 1);
Is that what you want? Or something else?
--
www.designacourse.com
The Easiest Way to Train Anyone... Anywhere.
Chris Smith - Lead Software Developer/Technical Trainer
MindIQ Corporation