Simply create multiple properties file one for each enviroment to store the environment specific settings.
Please have a look at below post to read the properties file at the time of server start-up.
EDIT
I want to write a property in my static html file which will be read by gwt. If the property is dev gwt should load test1.gwt.xml if property is prod gwt should load test2.gwt.xml.
Sample code that is written in your welcome file (index.jsp).
<!-- Read environment attribute from application -->
<% String evn = application.getAttribute("env"); %>
<% if("prod".equalsIgnoreCase(env)) { %>
<script type="text/javascript"
src="myproject/test2.nocache.js"></script>
<% } else { %>
<script type="text/javascript"
src="myproject/test1.nocache.js"></script>
<% } %>
Note: You can use JavaServer Pages Standard Tag Library instead of Scriptlets.