Is it possible to detect the hostname used in java (even through a cname)?
I am looking for something similar to this: http://api.drupal.org/api/function/conf_path/6
In that code, drupal checks to see what domain name is accessing it in order to load the correct configuration (multi-site). If the domain doesn't match any configurations, it just goes to the default configuration.