1 |
|
//---PACKAGE DECLARATION--- |
2 |
< |
package uk.org.iscream.filter; |
2 |
> |
package uk.org.iscream.cms.server.filter; |
3 |
|
|
4 |
|
//---IMPORTS--- |
5 |
< |
import uk.org.iscream.core.*; |
6 |
< |
import uk.org.iscream.componentmanager.*; |
7 |
< |
import uk.org.iscream.filter.*; |
8 |
< |
import uk.org.iscream.util.*; |
5 |
> |
import uk.org.iscream.cms.server.core.*; |
6 |
> |
import uk.org.iscream.cms.server.componentmanager.*; |
7 |
> |
import uk.org.iscream.cms.server.filter.*; |
8 |
> |
import uk.org.iscream.cms.server.util.*; |
9 |
|
import java.net.InetAddress; |
10 |
|
|
11 |
|
/** |
56 |
|
* Overrides the {@link java.lang.Object#toString() Object.toString()} |
57 |
|
* method to provide clean logging (every class should have this). |
58 |
|
* |
59 |
< |
* This uses the uk.org.iscream.util.NameFormat class |
59 |
> |
* This uses the uk.org.iscream.cms.server.util.NameFormat class |
60 |
|
* to format the toString() |
61 |
|
* |
62 |
|
* @return the name of this class and its CVS revision |
91 |
|
*/ |
92 |
|
public String getHostName() { |
93 |
|
try { |
94 |
< |
return InetAddress.getLocalHost().getHostName(); |
94 |
> |
// hacky fix for windows boxes, where getHostName() returns the NetBIOS name ! |
95 |
> |
return InetAddress.getByName(InetAddress.getLocalHost().getHostAddress()).getHostName(); |
96 |
|
} catch (java.net.UnknownHostException e) { |
97 |
|
_logger.write(toString(), Logger.ERROR, e.getMessage()); |
98 |
|
} |