title: Using JSTL to get a dropdown list from enum class into JSP
body: <p>I am new to JSTL and Spring Framework. I am trying to populate a dropdown list in a spring form using JSTL tags. The values are coming from an <code>Enum class</code>. But for some reason I am getting a blank list. There are no error messages.</p>
  
  <p>ENUM Class:</p>
  
  <pre><code>package edu.bnu.fyp.stp.constants;
  public enum TutorType {
      Home_Tutor ("Home Tutor"), Online_Tutor ("Online Tutor");
      private String tutorType;
      private TutorType(String s){
          tutorType = s;
      }
      public String getTutorType() {
          return tutorType;
      }
      public void setTutorType(String tutorType) {
          this.tutorType = tutorType;
      }
  }
  </code></pre>
  
  <p>Controller Class:</p>
  
  <pre><code>@RequestMapping(value = "/studentdashboard/requirement")
  public String showPostRequirement(Model model){
      List &lt;TutorType&gt; tutorTypes = tutorTypes = new ArrayList&lt;TutorType (Arrays.asList(TutorType.values()));
      model.addAttribute("TutorType", TutorType.values());
      return "Requirement";
  }
  </code></pre>
  
  <p>JSP</p>
  
  <pre><code>&lt;select name="${status.expression}" name="TutorType" id="TutorType"&gt;
       &lt;option value=""&gt;&lt;/option&gt;
       &lt;items="${TutorType}" var="option"&gt;
       &lt;option value="${option}"&gt;
           &lt;co:out value="${option.tutorType}"&gt;&lt;/co:out&gt;
       &lt;/option&gt;
       &lt;/&gt;
  &lt;/select&gt;
  </code></pre>
  
  <p>Please let me know where I am doing this wrong? Thank you</p>