title: How to print Hashmap values in xhtml page
body: <p>I need your help and assistant in displaying each value in the Hashmap separately in an xhtml page. I tried to convert the hashmap to List, but I wasn't successful. My code is below:</p>
  
  <pre><code>private List&lt;String&gt; selectedTypes = new ArrayList&lt;String&gt;();
  // The above list will store the selected types for example:(A,B)
  
   Map&lt;String, String&gt; typesNames = new HashMap&lt;String,String&gt;(selectedTypes.size());
  
          typesNames .put("A", "Type A");
  
          typesNames .put("B", "Type B");
  
          typesNames .put("C", "Type C");  
  
      for(String key: selectedTypes)
      {
                   System.out.println(typesNames.get(key));
      }
  </code></pre>
  
  <p>The result is showing in the console as:
  Type A
  Type B       </p>
  
  <p>So now my issue is that how to display the above output in the xhtml page in a list?</p>