How do determine LIVE vs UAT environment
<p>Currently in my app I'm using this in a jsp to determine my environment</p>

<pre><code>&lt;% String environment = (request.getRequestURL().indexOf("localhost") &gt; 0) ? "dev" : "uat"; %&gt;
&lt;% request.setAttribute("environment", environment); %&gt;
&lt;% if (!environment.equals("live")) { %&gt;
</code></pre>

<p>I'd really like to change that so that it's a server-specific setting because there are a few other places where I need to run this same check.  Is it possible for me to set a variable on my UAT server to <code>UAT</code> and then the absense of that variable on dev means that we're in dev?</p>

<p>Any thoughts?</p>
