title: How to retrieve HashMap using JSTL forEach loop
body: <p>I have some data to be sent from ModelandView class which has a map. I map the data and send it to my jsp page. But not able to retrieve the data using jstl tag. The controller is sending the data to the specified jsp but its not displayed in the specified field due to jstl tag usage. It would be great if someone finds the error.</p>
  
  <p><strong>Controller.java</strong></p>
  
  <pre><code>    public ModelandView getData(@Context HttpServletRequest request) {
            Map&lt;String,String&gt; map=new HashMap&lt;String,String&gt;();
              ModelandView responseView = new ModelandView("trackData",map);
              //some code here
              if (somecondition) {
                  map.put("data",detailsVO.getVehicleId());
                  responseView.addAllObjects(map);
              }
              else {
                  System.out.println("Not present");
              }
              return responseView;
          }
  </code></pre>
  
  <p><strong>trackData.jsp</strong></p>
  
  <pre><code>&lt;select class="testdata" id="listvehicle"&gt;
  &lt;c:forEach var="sample" items="${data}"&gt;
  &lt;option&gt; ${sample}&lt;/option&gt;
  &lt;/c:forEach&gt;
  &lt;/select&gt;
  </code></pre>
  
  <p>The jsp page is not displaying any values in the drop-down list.</p>