title: Getting the value of a Map in Struts2 JSP
body: <p>I am loading a map of values into ServletContext during start of the application/server</p>
  
  <pre><code>HashMap&lt;String, List&lt;String&gt;&gt; cfsUfsMap = new HashMap&lt;String, List&lt;String&gt;&gt;();
  //some operations
  application.setAttribute("UDM_UFS_CFS_MAP", cfsUfsMap); //application = ServletContext
  </code></pre>
  
  <p>I need to use this map directly in JSP page, for which I have done this</p>
  
  <pre><code>&lt;s:set name="udm_cfs_ufs_map" value="#application.UDM_UFS_CFS_MAP" /&gt;
  &lt;table class="first" width="100%" border="0" cellpadding="0" id="sups_assignedservices_info_table"&gt;
  &lt;tr&gt;
      &lt;th width="30%"&gt;Assigned service name &lt;/th&gt;
      &lt;th width="15%"&gt;CFS Code &lt;/th&gt;
      &lt;th width="15%"&gt;Status &lt;/th&gt;
      &lt;th width="20%"&gt;Date &lt;/th&gt;
      &lt;th width="20%"&gt;UDM &lt;/th&gt;
  &lt;/tr&gt;
  &lt;s:iterator value="#sups_services.services"&gt;
      &lt;s:set name="ufs_list" value="#udm_cfs_ufs_map.['top.code']" /&gt; 
      &lt;tr&gt;                
          &lt;td class="light"&gt;&lt;s:property value="top.name"/&gt; &lt;/td&gt;
          &lt;td class="light"&gt;&lt;s:property value="top.code"/&gt; &lt;/td&gt;
          &lt;td class="light"&gt;&lt;s:property value="top.status"/&gt; &lt;/td&gt;
          &lt;td class="light"&gt;&lt;s:property value="top.date"/&gt; &lt;/td&gt;  
          &lt;td class="light"&gt;&lt;s:property value="#udm_cfs_ufs_map.size()" /&gt; - &lt;s:property value="#ufs_list.size()" /&gt;&lt;/td&gt;
      &lt;/tr&gt;   
  &lt;/s:iterator&gt;
  </code></pre>
  
  <p></p>
  
  <p>As you see, I am trying to get the values (List) from map using key which's top.code 
  However I am getting original map size but not the list size based on key.</p>
  
  <p>Any idea what's missing/going wrong</p>