In PHP, we return the JSON to an AJAX call like this:
json_encode($data);
How do we do that in JSP?
JSP:
<%
gson.toJson(map, System.out); // last line
%>
jQuery:
$.get("lookup_all_phone_numbers.jsp")
.done(function(data){
$("#results").append(data);
});