title: Resultset To List
body: <p>I want to convert my Resultset to List in my JSP page. and want to display all the values.  This is my query:</p>
  
  <pre><code>SELECT userId, userName 
    FROM user;
  </code></pre>
  
  <p>I have executed that using <strong>preparedstatement</strong> and got the <strong>Resultset</strong>. But how to convert it as a <strong>List</strong> and  want to display the result like this: </p>
  
  <pre><code>userID  userName
  ------------------
  1001    user-X 
  1006    user-Y  
  1007    user-Z
  </code></pre>