<p>In a servlet I do the following:</p>

<pre><code>  Context context = new InitialContext();
  value = (String) context.lookup("java:comp/env/propertyName");
</code></pre>

<p>On an Apache Geronimo instance (WAS CE 2.1) how do i associate a value with the key <em>propertyName</em>?</p>

<p>In Websphere AS 6 i can configure these properties for JNDI lookup under the "Name Space Bindings" page in the management console, but for the life of me I can find no way to do this in community edition on the web.</p>

One possibility is to add the properties to your web.xml file (in the WEB-INF directory), using one or more
```
<env-entry>
```
tags. For example, something like the following:
```
```
<env-entry>
   <description>My string property</descriptor>
   <env-entry-name>propertyName</env-entry-name>
   <env-entry-type>java.lang.String</env-entry-type>
   <env-entry-value>Your string goes here</env-entry-value>
</env-entry>
```
```
Each env-entry tag declares a new environment variable that you can then access from the
```
java:comp/env
```
context.
Once you add the necessary
```
env-entry
```
's you can use code similar to what you already posted to access these values. Mind you, I don't have Geronimo installed, so I don't know if there is any additional configuration that needs to be done in order to make this work.