title: easiest way to get list of USA states
body: <p>What would be the easiest way to get list of US states?</p>
  
  <p>I need to use these in the JSP form, currently I have enum that works just fine. However I am wondering how this could be improved...</p>
  
  <pre><code>public enum State {
      AL("Alabama"),
      MT("Montana"),
      AK("Alaska"),
      NE("Nebraska"),
      AZ("Arizona"),
      NV("Nevada"),
      AR("Arkansas"),
      NH("NewHampshire"),
      CA("California"),
      NJ("NewJersey"),
      CO("Colorado"),
      NM("NewMexico"),
      CT("Connecticut"),
      NY("NewYork"),
      DE("Delaware"),
      NC("NorthCarolina"),
      FL("Florida"),
      ND("NorthDakota"),
      GA("Georgia"),
      OH("Ohio"),
      HI("Hawaii"),
      OK("Oklahoma"),
      ID("Idaho"),
      OR("Oregon"),
      IL("Illinois"),
      PA("Pennsylvania"),
      IN("Indiana"),
      RI("RhodeIsland"),
      IA("Iowa"),
      SC("SouthCarolina"),
      KS("Kansas"),
      SD("SouthDakota"),
      KY("Kentucky"),
      TN("Tennessee"),
      LA("Louisiana"),
      TX("Texas"),
      ME("Maine"),
      UT("Utah"),
      MD("Maryland"),
      VT("Vermont"),
      MA("Massachusetts"),
      VA("Virginia"),
      MI("Michigan"),
      WA("Washington"),
      MN("Minnesota"),
      WV("WestVirginia"),
      MS("Mississippi"),
      WI("Wisconsin"),
      MO("Missouri"),
      WY("Wyoming");
  private String state;
  private State(String state) {
              this.state = state;
  }
  public String getStatusCode() {
              return this.state;
  }
  }
  </code></pre>
  
  <p>I then pass it to the model and in JSP (Spring form) call these like:</p>
  
  <pre><code>&lt;form:form&gt;
  ...
      &lt;form:select path="state" id="state"&gt;
          &lt;form:options items="${usaStates}"  /&gt;
      &lt;/form:select&gt;
      &lt;form:errors path="state" cssClass="error"/&gt;
  
  ...
  &lt;/form:form&gt;
  </code></pre>