title: How to convert a ResultSet object to a JSON format output
body: <p>I have got a ResultSet after firing a query. Kindly let me know how i can convert it to a JSON output in JSP.</p>
  
  <p>In the second stage, lets assume that we have got a JSON output like in this link > <a href="http://inknpost.com/eshopping/json.jsp" rel="noreferrer">http://inknpost.com/eshopping/json.jsp</a> </p>
  
  <p>The above file is being accessed by a $.getJSON(); in another file. </p>
  
  <p>Kindly let me know how can i display the "names" and the "departments" in different rows in a page. </p>