title: populating drop down values from the database
body: <p>This question might have been asked thousands of time, but I am unable to get this working. </p>
  
  <p>I need to populate the drop down values from the database when the page gets loaded. I have a domain class of table is defined as <strong><em>"CountryList"</em></strong></p>
  
  <p>I am getting the list of all the countries like</p>
  
  <pre><code>@RenderMapping(params = "action=studentPage")
  
      public String studentSetUpPage(RenderRequest request,
                  RenderResponse response, ModelMap model) {
  
  
  // some code
  
  ArrayList&lt;CountryList&gt; getAllCountries = serviceClass.getAllCountries(id);
  
  for(CountryList country : getAllCountries){
  
      System.out.println(" Country " + listCountry.getCountry());
  
  }
  
  
  }
  </code></pre>
  
  <p><strong>JSP Code</strong></p>
  
  <pre><code>&lt;form action="&lt;%=save%&gt;" method="POST" name="createpage"                                            id="createPage"&gt;
  
  &lt;table&gt;
      &lt;c:forEach var="mainform1" items="${mainform2}"&gt;
  
  &lt;aui:select name="countrySelect" id="countrySelect"
            label="Country :" inlineLabel="Country:"
            showRequiredLabel="false"&gt;
  
            &lt;c:forEach var="countryList"
              items="${mainform2.countryList}"&gt;
           &lt;aui:option label="....."
           value=".........."&gt;
           &lt;/aui:option&gt;
           &lt;/c:forEach&gt;
  
  &lt;/aui:select&gt;
  
  &lt;/c:forEach&gt;
  &lt;/table&gt;
  &lt;/form&gt;
  </code></pre>
  
  <p>It's printing all the countries on the console. </p>
  
  <p>I want to print these values in the drop down in the jsp. Any help?</p>