title: Calling a backend Java method from JavaScript/jQuery in JSP
body: <p>I have a JSP in which there is a <code>select</code> list containing entity kind names. When I select an entity kind I need to populate another <code>select</code> list with the field names of the selected entity kind. For that I call a JavaScript function on the <code>onchange</code> event. </p>
  
  <p>In the JavaScript method I need to call a method in the backend that returns an <code>arraylist</code> that contains the field names of the selected entity kind. </p>
  
  <p>How do I call the method with and without Ajax? Also how do I populate the second select list dynamically with the <code>arrayList</code>?</p>