title: How to Set a HashMap from jsp to Action
body: <p>I have a HashMap in my Action class:</p>
  
  <pre><code>private Map&lt;String, String&gt; ids = new HashMap&lt;String, String&gt;();
  </code></pre>
  
  <p>In jsp I'm trying to set this hashmap like this:</p>
  
  <pre><code>&lt;input type="text" name="ids[0].key" value="key"&gt;
  &lt;input type="text" name="ids[0]" value="value"&gt;
  </code></pre>
  
  <p>But when after submit, when I iterate over the map in the action like this:</p>
  
  <pre><code>if(ids!=null){
      for(Map.Entry&lt;String, String&gt; entry : ids.entrySet()){
          system.out.println(entry.getKey()+"-"+entry.getValue());
      }
  }
  </code></pre>
  
  <p>I only get "0-value" instead of "key-value"</p>
  
  <p>How Can I do what I want? Can someone help me with this?</p>