title: How to populate combobox,taking values from enum
body: <p>I have a jsp page with one combo box and I have a class which is an enum.</p>
  
  <p>I want to populate my combo box in jsp and when it's populated I want to save these value in D/B how can I do it in Struts 2</p>
  
  <pre><code>public enum Roles {
    ONE   ("One"),
    TWO   ("Two"),
    THREE ("Three"),
    FOUR  ("Four"),
    FIVE  ("Five"),
    ALL   ("All");
  
    private final String displayValue;
  
    private Roles(String displayString){
        this.displayValue = displayString;
    }
    public String getDisplayString() {
        return displayValue;
    } 
  
    public static Roles getRoleOf(String displayValue){         
        if(displayValue.equals("One"))
            return ONE;
        if(displayValue.equals("Two"))
            return TWO;
        if(displayValue.equals("Three"))
            return THREE;
        if(displayValue.equals("Four"))
            return FOUR;
          if(displayValue.equals("All"))
            return ALL;
        else return ALL;
    }
  }
  </code></pre>