I have to write some code that pulls from an external source on our construction / QA environment, I output it to a different source I want to produce. Simply need a route to identify the server name (like CurrentPage.getName (), but more like currentServer.getName ().
Sorry for the limited information I am not a Java developer.
I used to be able to get a list of available environment variables.
& lt;% map & lt; String, string & gt; EnvMap = System.getenv (); Sorted map & lt; String, string & gt; SortedInmemmemplate = New Trimmer & lt; String, string & gt; (ANVM); Set up & lt; String & gt; KeySet = sortedEnvMap.keySet (); For (string key: keyset) {string value = envMap.get (key); % & Gt; & Lt;% = key% & gt;: & lt;% = value% & gt; & Lt; Br> & Lt;%}% & gt;
This led me to this bit code.
string server = System.getenv ("HOSTNAME");
Comments
Post a Comment