title: Populate drop down menu from database
body: <p>I have this method in my controller to get all the created floors so that I can use it in creating a room record.</p>
  
  <p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false">
  <div class="snippet-code">
  <pre class="snippet-code-html lang-html prettyprint-override"><code> @RequestMapping(method = RequestMethod.POST, produces = "text/html")
      public String create(@Valid Room room, BindingResult bindingResult, Model uiModel, HttpServletRequest httpServletRequest) {
          if (bindingResult.hasErrors()) {
              populateEditForm(uiModel, room);
              return "rooms/create";
          }
          uiModel.asMap().clear();
          roomService.saveRoom(room);
          return "redirect:/rooms/" + encodeUrlPathSegment(room.getId().toString(), httpServletRequest);
      }
  
   @RequestMapping(params = "form", produces = "text/html")
      public String createForm(Model uiModel) {
          populateEditForm(uiModel, new Room());
          return "rooms/create";
      }
  
  
  
  
  
   void populateEditForm(Model uiModel, Room room) {
          uiModel.addAttribute("room", room);
          uiModel.addAttribute("floors", Floor.findAllFloors());
      }</code></pre>
  </div>
  </div>
  </p>
  
  <p>Then, I originally have this code in my views page to display the floors in a dropdown list:</p>
  
  <p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false">
  <div class="snippet-code">
  <pre class="snippet-code-html lang-html prettyprint-override"><code>&lt;field:select field="floor"
  id="c_ph_com_smesoft_hms_domain_Room_floor" itemValue="id"
  items="${floors}" path="/floors" z="BO2RLJSaIYxNwRbKJMRipi883S8=" /&gt;
         </code></pre>
  </div>
  </div>
  </p>
  
  <p>The code above works perfectly fine. How to translate this code in to this format: </p>
  
  <p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false">
  <div class="snippet-code">
  <pre class="snippet-code-html lang-html prettyprint-override"><code>&lt;select&gt;
  &lt;c:forEach&gt;
  &lt;option&gt;&lt;/option&gt;
  &lt;/c:forEach&gt;
  &lt;/select&gt; </code></pre>
  </div>
  </div>
  </p>