title: getting form:options value in AJAX
body: <p>Jsp code is as follows:</p>
  
  <pre><code>&lt;form:select id="taxId" path="taxSeqNo" cssClass="defaultText"        &lt;form:options items="${taxListItemsBean.taxList}" itemValue="key" itemLabel="label"/&gt;
  &lt;/form:select&gt;
  </code></pre>
  
  <p>Where ${taxListItemsBean.taxList} is declared as </p>
  
  <pre><code>private List&lt;KeyItemDto&gt; taxList;
  </code></pre>
  
  <p>in the form.java class.</p>
  
  <p>I want to pass this taxList through ajax to controller. Code in Ajax is:</p>
  
  <pre><code>//..
  var options = {
                  url: "${pageContext.request.contextPath}/abc.html",
                  dataType : 'json',
                  contentType:'application/json',
                  data: JSON.stringify(taxList ),
                  beforeSubmit: function(data,set,options) {
                      if(!confirm("xxx?")) {
                          return false;
                      }
                  },
  
  ..//
  </code></pre>
  
  <p>Controller code:</p>
  
  <pre><code>@RequestMapping(value = "/abc.html", method = RequestMethod.POST)
      public ModelAndView executeConfirmTaxHttpServletRequest request,
        , @RequestBody List&lt;KeyItemDto&gt; taxList) {
  
  System.out.println("taxList "+taxList);
  
  }
  </code></pre>
  
  <p>With the above code im getting a NPE in Ajax at this line :</p>
  
  <pre><code>data: JSON.stringify(taxList ),
  </code></pre>
  
  <p>Not sure what is wrong with the code and how would it get passed to controller and retrieved. Any inputs appreciated. </p>