title: Enum values as dropdown list
body: <p>I am facing an issue populating a dropdown list from Enum class values. My enum class code is: <br/></p>
  
  <pre><code>package abc.xyz.constants;
  
  public enum StateConstantsEnum
  {
             NEWYORK("NY"), 
              FLORIDA("FL"), 
              CALIFORNIA("CA"), 
  
      private String fullState;
  
      private StateConstantsEnum( String s )
      {
          fullState = s;
      }
  
      public String getState()
      {
          return fullState;
      }
  }
  </code></pre>
  
  <p>I want populate dropdown list with NEWYORK, FLORIDA and CALIFORNIA. I am creating and adding the list to Spring model this way: <br/></p>
  
  <pre><code>List&lt;StateConstantsEnum&gt; stateList = new ArrayList&lt;StateConstantsEnum&gt;( Arrays.asList(StateConstantsEnum.values() ));
  
  model.addAttribute("stateList", stateList);
  </code></pre>
  
  <p>Then I am trying to populate the dropdown in JSP using: <br/></p>
  
  <pre><code>&lt;select name="${status.expression}" name="stateLst" id="stateLst"&gt;
      &lt;option value=""&gt;&lt;/option&gt;
          &lt;c:forEach items="${stateList}" var="option"&gt;
                  &lt;option value="${option}"&gt;
                      &lt;c:out value="${option.fullState}"&gt;&lt;/c:out&gt;
                  &lt;/option&gt;
          &lt;/c:forEach&gt;
  &lt;/select&gt;
  </code></pre>
  
  <p>But I am getting an exception <strong>"Exception created : javax.el.PropertyNotFoundException: 
  The class 'abc.xyz.constants.StateConstantsEnum' does not have the property 'fullState'."</strong></p>
  
  <p>How do I fix this problem? Help much appreciated</p>