title: populating form fields on select of dropdown from java beans
body: <p>i have an html form with 5 text fields.</p>
  
  <p>i have an ArrayList of user objects created from a database query in a servlet.</p>
  
  <p>i have populated a dropdown menu of selection choices using jstl and it populates fine.</p>
  
  <pre><code>&lt;c:forEach var="user" items="${userList}"&gt;
  &lt;option&gt;${user.userName}&lt;/option&gt;
  &lt;/c:forEach&gt;
  </code></pre>
  
  <p>what i'm trying to do is isolate the user object from the array list on selection, and populate the form fields with other properties of the selected object such as:</p>
  
  <p>user.firstName , user.lastName, user.email etc....</p>
  
  <p>i have been searching for an answer most of the day with no luck.</p>
  
  <p>any help is appreciated.</p>