Java - Setting context attributes (ServletContextListener)
<p>I read a properties-file at the webapplication startup phase (contextInitialized()) and I started to think about how to make these settings 'visible' to the servlets. Do I need to loop through the keys and add each and every one to the context, like this</p>

<pre><code>Iterator i = settings.keySet().iterator();
while (i.hasNext()) {
 key = (String) i.next();
 value = (String) settings.get(key);
 context.setAttribute(key, value);
}
</code></pre>

<p>or are there better methods?</p>

<p>Thank you!</p>

<p>/Adam</p>
