title: How to generate div's dynamically by iterating map using jstl in jsp page?
body: <p>I have a snippet of html like below in my jsp page which works fine if I start the service since everything is static. As you can see below I am showing different images within div <code>&lt;div class="row templatemorow"&gt;</code>. Only the images url is different and all other classes, fields are same.</p>
  
  <pre><code>&lt;div class="row templatemorow"&gt;
      &lt;!-- How to generate these below div dynamically and just change the image url -- &gt;
      &lt;!-- First Image --&gt;
      &lt;div class="hex col-sm-6"&gt;
          &lt;div&gt;
              &lt;div class="hexagon hexagon2 gallery-item"&gt;
                  &lt;div class="hexagon-in1"&gt;
                      &lt;div class="hexagon-in2" style="background-image: url(images/gallery/1.jpg);"&gt;
                          &lt;div class="overlay"&gt;
                              &lt;a href="images/gallery/1.jpg" data-rel="lightbox" class="fa fa-expand"&gt;&lt;/a&gt;
                          &lt;/div&gt;
                      &lt;/div&gt;
                  &lt;/div&gt;
              &lt;/div&gt;
          &lt;/div&gt;
      &lt;/div&gt;
      &lt;!-- Second Image --&gt;
      &lt;div class="hex col-sm-6"&gt;
          &lt;div&gt;
              &lt;div class="hexagon hexagon2 gallery-item"&gt;
                  &lt;div class="hexagon-in1"&gt;
                      &lt;div class="hexagon-in2" style="background-image: url(images/gallery/2.jpg);"&gt;
                          &lt;div class="overlay"&gt;
                              &lt;a href="images/gallery/2.jpg" data-rel="lightbox" class="fa fa-expand"&gt;&lt;/a&gt;
                          &lt;/div&gt;
                      &lt;/div&gt;
                  &lt;/div&gt;
              &lt;/div&gt;
          &lt;/div&gt;
      &lt;/div&gt;
  &lt;/div&gt;
  </code></pre>
  
  <p>Now I am trying to make this dynamic as I already have <code>image url</code> in a map so I just need to figure out how to iteare this map and generate div <code>&lt;div class="hex col-sm-6"&gt;</code> dynamically by changing the image url in it? I am using JSTL here. </p>
  
  <p>I have a string to string map called <code>holder</code> in which key is <code>title</code> and value is <code>full image url with http</code> so I need to iterate this <code>holder</code> map and generate div dynamically with different image url. So If I have 10 entries in the map then there should 10 div with <code>class="hex col-sm-6"</code> generated dyanmically I guess.</p>
  
  <pre><code>&lt;div class="row templatemorow"&gt;
      &lt;!-- How to generate these below div dynamically and just change the image url -- &gt;
  
      &lt;c:forEach var="e" items="${images.holder}"&gt;
  
      &lt;!-- iterate holder map and generate div's accordingly -- &gt;
  
  
  &lt;/div&gt;
  </code></pre>
  
  <p>I am new to JSTL so I am not able to understand how can I generate these div's dynamically by iterating the <code>holder</code> map in my JSP page.</p>